mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
export permission
This commit is contained in:
@@ -237,6 +237,10 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if ($this->getAcl()->get('exportPermission') !== 'yes' && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (!$this->getAcl()->check($this->name, 'read')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@ return array (
|
||||
'tabList' => ["Account", "Contact", "Lead", "Opportunity", "Case", "Email", "Calendar", "Meeting", "Call", "Task", "_delimiter_", "Document", "Campaign", "KnowledgeBaseArticle", "Stream", "User"],
|
||||
'quickCreateList' => ["Account", "Contact", "Lead", "Opportunity", "Meeting", "Call", "Task", "Case", "Email"],
|
||||
'exportDisabled' => false,
|
||||
'exportInPortalDisabled' => true,
|
||||
'adminNotifications' => true,
|
||||
'assignmentEmailNotifications' => false,
|
||||
'assignmentEmailNotificationsEntityList' => ['Lead', 'Opportunity', 'Task', 'Case'],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"fields": {
|
||||
"exportPermission": "Export Permission"
|
||||
},
|
||||
"links": {
|
||||
"users": "Users"
|
||||
@@ -11,5 +12,8 @@
|
||||
"Create PortalRole": "Create Portal Role",
|
||||
"Scope Level": "Scope Level",
|
||||
"Field Level": "Field Level"
|
||||
},
|
||||
"tooltips": {
|
||||
"exportPermission": "Defines wheter portal users have an ability to export records."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"assignmentPermission": "Assignment Permission",
|
||||
"userPermission": "User Permission",
|
||||
"portalPermission": "Portal Permission",
|
||||
"groupEmailAccountPermission": "Group Email Account Permission"
|
||||
"groupEmailAccountPermission": "Group Email Account Permission",
|
||||
"exportPermission": "Export Permission"
|
||||
},
|
||||
"links": {
|
||||
"users": "Users",
|
||||
@@ -15,7 +16,8 @@
|
||||
"assignmentPermission": "Allows to restrict an ability to assign records and post messages to other users.\n\nall - no restriction\n\nteam - can assign and post only to teammates\n\nno - can assign and post only to self",
|
||||
"userPermission": "Allows to restrict an ability for users to view activities, calendar and stream of other users.\n\nall - can view all\n\nteam - can view activities of teammates only\n\nno - can't view",
|
||||
"portalPermission": "Defines an access to portal information, ability to post messages to portal users.",
|
||||
"groupEmailAccountPermission": "Defines an access to group email accounts, an ability to send emails from group SMTP."
|
||||
"groupEmailAccountPermission": "Defines an access to group email accounts, an ability to send emails from group SMTP.",
|
||||
"exportPermission": "Defines wheter users have an ability to export records."
|
||||
},
|
||||
"labels": {
|
||||
"Access": "Access",
|
||||
|
||||
10
application/Espo/Resources/layouts/PortalRole/detail.json
Normal file
10
application/Espo/Resources/layouts/PortalRole/detail.json
Normal file
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"rows": [
|
||||
[
|
||||
{"name": "name"},
|
||||
{"name": "exportPermission"}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -3,18 +3,14 @@
|
||||
"rows": [
|
||||
[
|
||||
{"name": "name"},
|
||||
{"name": "assignmentPermission"}
|
||||
{"name": "exportPermission"}
|
||||
],
|
||||
[
|
||||
false,
|
||||
{"name": "assignmentPermission"},
|
||||
{"name": "userPermission"}
|
||||
],
|
||||
[
|
||||
false,
|
||||
{"name": "portalPermission"}
|
||||
],
|
||||
[
|
||||
false,
|
||||
{"name": "portalPermission"},
|
||||
{"name": "groupEmailAccountPermission"}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -86,25 +86,29 @@
|
||||
"assignmentPermission",
|
||||
"userPermission",
|
||||
"portalPermission",
|
||||
"groupEmailAccountPermission"
|
||||
"groupEmailAccountPermission",
|
||||
"exportPermission"
|
||||
],
|
||||
"valuePermissionHighestLevels": {
|
||||
"assignmentPermission": "all",
|
||||
"userPermission": "all",
|
||||
"portalPermission": "yes",
|
||||
"groupEmailAccountPermission": "all"
|
||||
"groupEmailAccountPermission": "all",
|
||||
"exportPermission": "yes"
|
||||
},
|
||||
"permissionsDefaults": {
|
||||
"assignmentPermission": "all",
|
||||
"userPermission": "all",
|
||||
"portalPermission": "no",
|
||||
"groupEmailAccountPermission": "no"
|
||||
"groupEmailAccountPermission": "no",
|
||||
"exportPermission": "yes"
|
||||
},
|
||||
"permissionsStrictDefaults": {
|
||||
"assignmentPermission": "no",
|
||||
"userPermission": "no",
|
||||
"portalPermission": "no",
|
||||
"groupEmailAccountPermission": "no"
|
||||
"groupEmailAccountPermission": "no",
|
||||
"exportPermission": "no"
|
||||
},
|
||||
"scopeLevelTypesDefaults": {
|
||||
"boolean": true,
|
||||
|
||||
@@ -114,6 +114,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"valuePermissionList": [
|
||||
"exportPermission"
|
||||
],
|
||||
"permissionsDefaults": {
|
||||
"exportPermission": "no"
|
||||
},
|
||||
"permissionsStrictDefaults": {
|
||||
"exportPermission": "no"
|
||||
},
|
||||
"scopeLevelTypesDefaults": {
|
||||
"boolean": false,
|
||||
"record": false
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
},
|
||||
"fieldData": {
|
||||
"type": "jsonObject"
|
||||
},
|
||||
"exportPermission": {
|
||||
"type": "enum",
|
||||
"options": ["not-set", "yes", "no"],
|
||||
"default": "not-set",
|
||||
"tooltip": true,
|
||||
"translation": "Role.options.levelList"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
"tooltip": true,
|
||||
"translation": "Role.options.levelList"
|
||||
},
|
||||
"exportPermission": {
|
||||
"type": "enum",
|
||||
"options": ["not-set", "yes", "no"],
|
||||
"default": "not-set",
|
||||
"tooltip": true,
|
||||
"translation": "Role.options.levelList"
|
||||
},
|
||||
"data": {
|
||||
"type": "jsonObject"
|
||||
},
|
||||
|
||||
@@ -730,7 +730,7 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
if (
|
||||
this.getConfig().get('exportDisabled') && !this.getUser().get('isAdmin')
|
||||
||
|
||||
this.getUser().get('isPortalUser') && this.getConfig().get('exportInPortalDisabled')
|
||||
this.getAcl().get('exportPermission') === 'no'
|
||||
) {
|
||||
this.removeMassAction('export');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user