Change #113, by default, only the administrator is allowed to perform bulk deletions

SVN:trunk[375]
This commit is contained in:
Romain Quetiez
2010-04-30 08:21:33 +00:00
parent bc1292c54b
commit 6fcbd77b99

View File

@@ -256,6 +256,8 @@ class URP_Profiles extends UserRightsBaseClass
'bulkread' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Bulk Read'), 'bulkread' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Bulk Read'),
'write' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Modify'), 'write' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Modify'),
'bulkwrite' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Bulk Modify'), 'bulkwrite' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Bulk Modify'),
'delete' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Delete'),
'bulkdelete' => $this->GetGrantAsHtml($oUserRights, $sClass, 'Bulk Delete'),
'stimuli' => $sStimuli, 'stimuli' => $sStimuli,
); );
} }
@@ -266,6 +268,8 @@ class URP_Profiles extends UserRightsBaseClass
$aDisplayConfig['bulkread'] = array('label' => 'Bulk read', 'description' => 'List objects or export massively'); $aDisplayConfig['bulkread'] = array('label' => 'Bulk read', 'description' => 'List objects or export massively');
$aDisplayConfig['write'] = array('label' => 'Write', 'description' => 'Create and edit (modify)'); $aDisplayConfig['write'] = array('label' => 'Write', 'description' => 'Create and edit (modify)');
$aDisplayConfig['bulkwrite'] = array('label' => 'Bulk write', 'description' => 'Massively create/edit (CSV import)'); $aDisplayConfig['bulkwrite'] = array('label' => 'Bulk write', 'description' => 'Massively create/edit (CSV import)');
$aDisplayConfig['delete'] = array('label' => 'Write', 'description' => 'Delete');
$aDisplayConfig['bulkdelete'] = array('label' => 'Bulk delete', 'description' => 'Massively delete');
$aDisplayConfig['stimuli'] = array('label' => 'Stimuli', 'description' => 'Allowed (compound) actions'); $aDisplayConfig['stimuli'] = array('label' => 'Stimuli', 'description' => 'Allowed (compound) actions');
$oPage->table($aDisplayConfig, $aDisplayData); $oPage->table($aDisplayConfig, $aDisplayData);
} }
@@ -1506,7 +1510,8 @@ class SetupProfiles
self::DoCreateActionGrant($iProfile, UR_ACTION_MODIFY, $sClass); self::DoCreateActionGrant($iProfile, UR_ACTION_MODIFY, $sClass);
self::DoCreateActionGrant($iProfile, UR_ACTION_DELETE, $sClass); self::DoCreateActionGrant($iProfile, UR_ACTION_DELETE, $sClass);
self::DoCreateActionGrant($iProfile, UR_ACTION_BULK_MODIFY, $sClass); self::DoCreateActionGrant($iProfile, UR_ACTION_BULK_MODIFY, $sClass);
self::DoCreateActionGrant($iProfile, UR_ACTION_BULK_DELETE, $sClass); // By default, do not allow bulk deletion operations for standard users
// self::DoCreateActionGrant($iProfile, UR_ACTION_BULK_DELETE, $sClass);
} }
// Grant stimuli for given classes // Grant stimuli for given classes