acl: aclAllowDeleteCreated

This commit is contained in:
yuri
2017-11-03 16:48:18 +02:00
parent 05acdc4c5c
commit 8ad80c7a1a
5 changed files with 15 additions and 4 deletions
+5 -1
View File
@@ -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,