mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 04:47:10 +08:00
hide Subpanel create button when user not having create/edit privilege
This commit is contained in:
parent
23781b36a6
commit
0669235df7
1 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
namespace App\ViewDefinitions\LegacyHandler;
|
||||
|
||||
use ACLController;
|
||||
use App\Engine\LegacyHandler\LegacyHandler;
|
||||
use App\Engine\LegacyHandler\LegacyScopeState;
|
||||
use App\FieldDefinitions\Service\FieldDefinitionsProviderInterface;
|
||||
|
@ -296,7 +297,8 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strpos($top_button['widget_class'], 'Create') !== false) {
|
||||
if (strpos($top_button['widget_class'], 'Create') !== false
|
||||
&& ACLController::checkAccess($tab['module'], 'edit', true, 'module', true)) {
|
||||
$topButtons[] = [
|
||||
'key' => 'create',
|
||||
'labelKey' => 'LBL_QUICK_CREATE',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue