acl: aclAllowDeleteCreated
This commit is contained in:
@@ -260,7 +260,11 @@ class Base implements Injectable
|
||||
|
||||
if (is_object($data)) {
|
||||
if ($data->edit !== 'no' || $data->create !== 'no') {
|
||||
if ($entity->has('createdById') && $entity->get('createdById') == $user->id) {
|
||||
if (
|
||||
$this->getConfig()->get('aclAllowDeleteCreated')
|
||||
&&
|
||||
$entity->has('createdById') && $entity->get('createdById') == $user->id
|
||||
) {
|
||||
if (!$entity->has('assignedUserId')) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -166,6 +166,7 @@ return array (
|
||||
'currencyFormat' => 1,
|
||||
'currencyDecimalPlaces' => null,
|
||||
'aclStrictMode' => false,
|
||||
'aclAllowDeleteCreated' => false,
|
||||
'isInstalled' => false
|
||||
);
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@
|
||||
"b2cMode": "B2C Mode",
|
||||
"currencyFormat": "Currency Format",
|
||||
"currencyDecimalPlaces": "Currency Decimal Places",
|
||||
"aclStrictMode": "ACL Strict Mode"
|
||||
"aclStrictMode": "ACL Strict Mode",
|
||||
"aclAllowDeleteCreated": "Allow to remove created records"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
@@ -132,7 +133,8 @@
|
||||
"ldapUserDefaultTeam": "Default team for created user. For more, see user profile.",
|
||||
"b2cMode": "By default EspoCRM is adapted for B2B. You can switch it to B2C.",
|
||||
"currencyDecimalPlaces": "Number of decimal places. If empty then all nonempty decimal places will be displayed.",
|
||||
"aclStrictMode": "Enabled: Access to scopes will be forbidden if it's not specified in roles.\n\nDisabled: Access to scopes will be allowed if it's not specified in roles."
|
||||
"aclStrictMode": "Enabled: Access to scopes will be forbidden if it's not specified in roles.\n\nDisabled: Access to scopes will be allowed if it's not specified in roles.",
|
||||
"aclAllowDeleteCreated": "Users will be able to remove records they created even if they don't have a delete access."
|
||||
},
|
||||
"labels": {
|
||||
"System": "System",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[{"name": "useCache"}, {"name": "siteUrl"}],
|
||||
[{"name": "exportDisabled"}, {"name": "globalSearchEntityList"}],
|
||||
[{"name": "followCreatedEntities"}, {"name": "b2cMode"}],
|
||||
[{"name": "aclStrictMode"}, false]
|
||||
[{"name": "aclStrictMode"}, {"name": "aclAllowDeleteCreated"}]
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -423,6 +423,10 @@
|
||||
"type": "bool",
|
||||
"tooltip": true
|
||||
},
|
||||
"aclAllowDeleteCreated": {
|
||||
"type": "bool",
|
||||
"tooltip": true
|
||||
},
|
||||
"lastViewedCount": {
|
||||
"type": "int",
|
||||
"min": 1,
|
||||
|
||||
Reference in New Issue
Block a user