Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
baserule.php
1<?php
2
4
12
14{
22 public function execute(AccessibleItem $item = null, $params = null): bool
23 {
24 if($this->user->isAdmin())
25 {
26 return true;
27 }
28 $user = User::get($this->user->getUserId());
29
30 if ($user->isExtranet())
31 {
32 return false;
33 }
34
35 $action = ActionDictionary::getActionPermissionMap()[$params['action']];
37 {
38 return $user->isPortalAdmin() || in_array($action, RoleUtil::preparedRoleMap()['MANAGER']);
39 }
40
41 if($this->user->getPermission($action))
42 {
43 return true;
44 }
45
46 return false;
47 }
48}
execute(AccessibleItem $item=null, $params=null)
Definition baserule.php:22