Skip to content

Commit a662af0

Browse files
obfromeviryahiaoui
authored andcommitted
LUT-29924 : fix AccessDeniedException when trying to duplicate a step
1 parent c691aed commit a662af0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/java/fr/paris/lutece/plugins/forms/web/admin/FormStepJspBean.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,15 @@ public String doDuplicateStep( HttpServletRequest request ) throws AccessDeniedE
379379
}
380380

381381
int nIdForm = -1;
382-
checkUserPermission( Form.RESOURCE_TYPE, String.valueOf( nIdForm ), FormsResourceIdService.PERMISSION_MODIFY, request, ACTION_CREATE_STEP );
383-
checkWorkgroupPermission(nIdForm, request);
384-
385382
if ( nIdStep != -1 )
386383
{
387384
_step = StepHome.findByPrimaryKey( nIdStep );
388385

389386
if ( _step != null )
390387
{
391388
nIdForm = _step.getIdForm( );
389+
checkUserPermission( Form.RESOURCE_TYPE, String.valueOf( nIdForm ), FormsResourceIdService.PERMISSION_MODIFY, request, ACTION_CREATE_STEP );
390+
checkWorkgroupPermission(nIdForm, request);
392391

393392
try
394393
{

0 commit comments

Comments
 (0)