1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
rights.php
См. документацию.
1<?php
2namespace Bitrix\Landing;
3
4use \Bitrix\Landing\Internals\RightsTable;
5use \Bitrix\Main\Localization\Loc;
6use \Bitrix\Main\UserAccessTable;
7use Bitrix\Crm\Service\Container;
8
9Loc::loadMessages(__FILE__);
10
11class Rights
12{
16 const ENTITY_TYPE_SITE = 'S';
17
21 const ACCESS_TYPES = [
22 'denied' => 'denied',
23 'read' => 'read',
24 'edit' => 'edit',
25 'sett' => 'sett',
26 'public' => 'public',
27 'delete' => 'delete'
28 ];
29
34 'menu24' => 'menu24',//show in main menu of Bitrix24
35 'admin' => 'admin',//admin rights
36 'create' => 'create',//can create new sites
37 'unexportable' => 'unexportable',
38 'knowledge_menu24' => 'knowledge_menu24',// show Knowledge in main menu of Bitrix24
39 'knowledge_admin' => 'knowledge_admin',//admin rights
40 'knowledge_create' => 'knowledge_create',//can create new Knowledge base
41 'knowledge_unexportable' => 'knowledge_unexportable',
42 'knowledge_extension' => 'knowledge_extension',
43 'group_create' => 'group_create',//can create new social network group base
44 'group_admin' => 'group_admin',//admin rights
45 'group_menu24' => 'group_menu24',// show group in main menu of Bitrix24
46 'group_unexportable' => 'group_unexportable',
47 'mainpage_create' => 'mainpage_create',
48 ];
49
50 const SET_PREFIX = [
51 'knowledge',
52 'group',
53 ];
54
56 'unexportable',
57 'knowledge_unexportable',
58 'group_unexportable',
59 ];
60
65 protected static $allowedSites = [];
66
71 protected static $available = true;
72
77 protected static $globalAvailable = true;
78
83 protected static $userId = null;
84
89 public static function setOff()
90 {
91 self::$available = false;
92 }
93
98 public static function setOn()
99 {
100 self::$available = true;
101 }
102
107 public static function setGlobalOff()
108 {
109 self::$globalAvailable = false;
110 }
111
116 public static function setGlobalOn()
117 {
118 self::$globalAvailable = true;
119 }
120
125 public static function isOn()
126 {
127 if (
128 defined('LANDING_DISABLE_RIGHTS') &&
129 LANDING_DISABLE_RIGHTS === true
130 )
131 {
132 return false;
133 }
134 if (!self::$globalAvailable)
135 {
136 return false;
137 }
138 return self::$available;
139 }
140
145 public static function isAdmin()
146 {
147 if (self::hasAdditionalRight(self::ADDITIONAL_RIGHTS['admin'], null, false, true))
148 {
149 return true;
150 }
151 return Manager::isAdmin();
152 }
153
158 public static function getAllowedSites(): array
159 {
160 return self::$allowedSites;
161 }
162
168 public static function setContextUserId(int $uid): void
169 {
170 self::$userId = $uid;
171 }
172
177 public static function clearContextUserId(): void
178 {
179 self::$userId = null;
180 }
181
186 public static function getContextUserId(): int
187 {
188 if (!self::$userId)
189 {
190 self::$userId = Manager::getUserId();
191 }
192 return self::$userId;
193 }
194
199 protected static function isFeatureOn()
200 {
203 );
204 }
205
210 public static function getAccessTasks()
211 {
212 static $tasks = [];
213
214 if (empty($tasks))
215 {
216 $res = \CTask::getList(
217 ['LETTER' => 'ASC'],
218 ['MODULE_ID' => 'landing']
219 );
220 while ($row = $res->fetch())
221 {
222 $row['NAME'] = mb_substr($row['NAME'], 14);
223 $tasks[$row['ID']] = $row;
224 }
225 }
226
227 return $tasks;
228 }
229
234 public static function getAccessTasksReferences()
235 {
236 static $tasks = [];
237
238 if (empty($tasks))
239 {
240 foreach (self::getAccessTasks() as $accessTask)
241 {
242 $tasks[$accessTask['NAME']] = $accessTask['ID'];
243 }
244 }
245
246 return $tasks;
247 }
248
255 protected static function removeData($entityId, $entityType)
256 {
257 if (self::isFeatureOn())
258 {
259 $res = RightsTable::getList([
260 'select' => [
261 'ID'
262 ],
263 'filter' => [
264 'ENTITY_ID' => $entityId,
265 '=ENTITY_TYPE' => $entityType
266 ]
267 ]);
268 while ($row = $res->fetch())
269 {
270 RightsTable::delete($row['ID']);
271 }
272 }
273 }
274
280 public static function removeDataForSite($siteId)
281 {
282 self::removeData(
283 $siteId,
284 self::ENTITY_TYPE_SITE
285 );
286 }
287
295 protected static function getData($entityId, $entityType, array $preDefined = [])
296 {
297 static $access = null;
298 $items = [];
299 $codes = [];
300
301 if ($access === null)
302 {
303 $access = new \CAccess;
304 }
305
306 // filter (with predefined_
307 $filter = [
308 'ENTITY_ID' => $entityId,
309 '=ENTITY_TYPE' => $entityType
310 ];
311 if ($preDefined)
312 {
313 $filter['=ACCESS_CODE'] = array_keys($preDefined);
314 }
315
316 // main query
317 $res = RightsTable::getList([
318 'select' => [
319 'TASK_ID',
320 'ACCESS_CODE'
321 ],
322 'filter' => $filter
323 ]);
324 while ($row = $res->fetch())
325 {
326 $codes[] = $row['ACCESS_CODE'];
327 if (!isset($items[$row['ACCESS_CODE']]))
328 {
329 $row['TASK_ID'] = [$row['TASK_ID']];
330 $items[$row['ACCESS_CODE']] = $row;
331 }
332 else
333 {
334 $items[$row['ACCESS_CODE']]['TASK_ID'][] = $row['TASK_ID'];
335 }
336 if (isset($preDefined[$row['ACCESS_CODE']]))
337 {
338 unset($preDefined[$row['ACCESS_CODE']]);
339 }
340 }
341
342 $items = array_values($items);
343
344 // fill with predefined
345 foreach ($preDefined as $accessCode => $rightCode)
346 {
347 $items[] = [
348 'TASK_ID' => $rightCode,
349 'ACCESS_CODE' => $accessCode
350 ];
351 $codes[] = $accessCode;
352 }
353
354 // get titles
355 if ($items)
356 {
357 $codesNames = $access->getNames($codes);
358 foreach ($items as &$item)
359 {
360 if (isset($codesNames[$item['ACCESS_CODE']]))
361 {
362 $item['ACCESS_PROVIDER'] = (
363 isset($codesNames[$item['ACCESS_CODE']]['provider']) &&
364 $codesNames[$item['ACCESS_CODE']]['provider']
365 )
366 ? $codesNames[$item['ACCESS_CODE']]['provider']
367 : '';
368 $item['ACCESS_NAME'] = isset($codesNames[$item['ACCESS_CODE']]['name'])
369 ? $codesNames[$item['ACCESS_CODE']]['name']
370 : $item['ACCESS_CODE'];
371 }
372 }
373 unset($item);
374 }
375
376 return $items;
377 }
378
385 public static function getDataForSite($siteId, array $preDefined = [])
386 {
387 return self::getData(
388 $siteId,
389 self::ENTITY_TYPE_SITE,
390 $preDefined
391 );
392 }
393
400 protected static function getOperations($entityId, $entityType)
401 {
402 // full access for allowed sites
403 if (
404 $entityType == self::ENTITY_TYPE_SITE &&
405 in_array($entityId, self::$allowedSites)
406 )
407 {
408 $types = self::ACCESS_TYPES;
409 unset($types[self::ACCESS_TYPES['delete']]);
410 return array_values($types);
411 }
412
413 // check scoped method
414 if (
415 $entityType == self::ENTITY_TYPE_SITE
416 && !is_array($entityId) && $entityId > 0
417 )
418 {
419 $scopeOperationsSite = Site\Type::getOperationsForSite($entityId);
420 if ($scopeOperationsSite !== null)
421 {
422 return array_values($scopeOperationsSite);
423 }
424 }
425
426 $operations = [];
427 $operationsDefault = [];
428 $wasChecked = false;
429 $uid = self::getContextUserId();
430 $extendedMode = self::isExtendedMode();
431
432 // full access for admin
433 if (
434 $uid &&
435 self::isOn() &&
436 !self::isAdmin() &&
437 self::isFeatureOn() &&
438 self::exist()
439 )
440 {
441 $wasChecked = true;
442 $entityIdFilter = $entityId;
443 if (is_array($entityIdFilter))
444 {
445 $entityIdFilter[] = 0;
446 }
447 else
448 {
449 $entityIdFilter = [
450 $entityIdFilter, 0
451 ];
452 }
453 $filter = [
454 'ENTITY_ID' => $entityIdFilter,
455 '=ENTITY_TYPE' => $entityType,
456 'USER_ACCESS.USER_ID' => $uid,
457 '!TASK_OPERATION.OPERATION.NAME' => false
458 ];
459 if ($extendedMode)
460 {
461 $filter['ROLE_ID'] = 0;
462 }
463 else
464 {
465 $filter['ROLE_ID'] = Role::getExpectedRoleIds();
466 }
467 $res = RightsTable::getList(
468 [
469 'select' => [
470 'ENTITY_ID',
471 'OPERATION_NAME' => 'TASK_OPERATION.OPERATION.NAME'
472 ],
473 'filter' => $filter
474 ]
475 );
476 while ($row = $res->fetch())
477 {
478 if ($row['ENTITY_ID'] == 0)
479 {
480 $operationsDefault[] = mb_substr($row['OPERATION_NAME'], 8);
481 continue;
482 }
483 if (!isset($operations[$row['ENTITY_ID']]))
484 {
485 $operations[$row['ENTITY_ID']] = array();
486 }
487 $operations[$row['ENTITY_ID']][] = mb_substr($row['OPERATION_NAME'], 8);
488 $operations[$row['ENTITY_ID']] = array_unique($operations[$row['ENTITY_ID']]);
489 }
490 }
491
492 // set full rights, if rights are empty
493 foreach ((array) $entityId as $id)
494 {
495 if (!isset($operations[$id]))
496 {
497 if ($wasChecked && !$extendedMode)
498 {
499 $operations[$id] = !empty($operationsDefault)
500 ? $operationsDefault
501 : [self::ACCESS_TYPES['denied']];
502 }
503 else
504 {
505 $operations[$id] = array_values(self::ACCESS_TYPES);
506 }
507 }
508 }
509
510 return is_array($entityId)
511 ? $operations
512 : $operations[$entityId];
513 }
514
520 public static function getOperationsForSite($siteId): array
521 {
522 if (
523 is_array($siteId) ||
524 $siteId == 0 ||
525 Site::ping($siteId, true)
526 )
527 {
528 return self::getOperations(
529 $siteId,
530 self::ENTITY_TYPE_SITE
531 );
532 }
533 else
534 {
535 return [];
536 }
537 }
538
546 public static function hasAccessForSite($siteId, $accessType, $deleted = false)
547 {
548 static $operations = [];
549 $siteId = intval($siteId);
550
551 if (!is_string($accessType))
552 {
553 return false;
554 }
555
556 if (!isset($operations[$siteId]))
557 {
558 if ($siteId === 0 || !self::isOn() || Site::ping($siteId, $deleted))
559 {
560 $operations[$siteId] = self::getOperations(
561 $siteId,
562 self::ENTITY_TYPE_SITE
563 );
564 }
565 else
566 {
567 $operations[$siteId] = [];
568 }
569 }
570
571 return in_array($accessType, $operations[$siteId]);
572 }
573
580 public static function hasAccessForLanding($landingId, $accessType)
581 {
582 static $operations = [];
583 $landingId = intval($landingId);
584
585 if (!is_string($accessType))
586 {
587 return false;
588 }
589
590 if (!isset($operations[$landingId]))
591 {
593 'select' => [
594 'SITE_ID'
595 ],
596 'filter' => [
597 'ID' => $landingId,
598 '=SITE.DELETED' => ['Y', 'N'],
599 '=DELETED' => ['Y', 'N']
600 ]
601 ])->fetch();
602
603 if ($site)
604 {
605 $operations[$landingId] = self::getOperations(
606 $site['SITE_ID'],
607 self::ENTITY_TYPE_SITE
608 );
609 }
610 else
611 {
612 $operations[$landingId] = [];
613 }
614 }
615
616 return in_array($accessType, $operations[$landingId]);
617 }
618
626 protected static function setOperations($entityId, $entityType, array $rights = [])
627 {
628 if (!self::isFeatureOn())
629 {
630 return false;
631 }
632
633 $tasks = self::getAccessTasksReferences();
634 $entityId = intval($entityId);
635
636 self::removeData(
637 $entityId,
638 $entityType
639 );
640
641 // add new rights
642 foreach ($rights as $accessCode => $rightCodes)
643 {
644 $rightCodes = (array) $rightCodes;
645 if (in_array(self::ACCESS_TYPES['denied'], $rightCodes))
646 {
647 $rightCodes = [self::ACCESS_TYPES['denied']];
648 }
649 else if (!in_array(self::ACCESS_TYPES['read'], $rightCodes))
650 {
651 $rightCodes[] = self::ACCESS_TYPES['read'];
652 }
653
654 foreach ($rightCodes as $rightCode)
655 {
656 if (isset($tasks[$rightCode]))
657 {
658 RightsTable::add([
659 'ENTITY_ID' => $entityId,
660 'ENTITY_TYPE' => $entityType,
661 'TASK_ID' => $tasks[$rightCode],
662 'ACCESS_CODE' => $accessCode
663 ]);
664 }
665 }
666 }
667
668 return true;
669 }
670
677 public static function setOperationsForSite($siteId, array $rights = [])
678 {
679 $siteId = intval($siteId);
680
681 if ($siteId == 0 || Site::ping($siteId))
682 {
683 return self::setOperations(
684 $siteId,
685 self::ENTITY_TYPE_SITE,
686 $rights
687 );
688 }
689 else
690 {
691 return false;
692 }
693 }
694
699 protected static function exist()
700 {
701 static $exist = null;
702
703 if ($exist === null)
704 {
706 $res = RightsTable::getList([
707 'select' => [
708 'ID'
709 ],
710 'filter' => $type
711 ? ['=ROLE.TYPE' => $type]
712 : [],
713 'limit' => 1
714 ]);
715 $exist = (bool) $res->fetch();
716 }
717
718 return $exist;
719 }
720
726 public static function getAccessFilter(array $additionalFilterOr = [])
727 {
728 $filter = [];
729
730 if (
731 self::isOn() &&
732 !self::isAdmin() &&
733 self::isFeatureOn() &&
734 self::exist()
735 )
736 {
737 $tasks = self::getAccessTasksReferences();
738 $extendedRights = self::isExtendedMode();
739 $uid = self::getContextUserId();
740
741 if ($extendedRights)
742 {
743 $filter[] = [
744 'LOGIC' => 'OR',
745 [
746 '!RIGHTS.TASK_ID' => $tasks[Rights::ACCESS_TYPES['denied']],
747 'RIGHTS.USER_ACCESS.USER_ID' => $uid
748 ],
749 [
750 '=RIGHTS.TASK_ID' => null
751 ],
752 $additionalFilterOr
753 ];
754 }
755 else
756 {
757 if ($additionalFilterOr)
758 {
759 $filter[] = [
760 'LOGIC' => 'OR',
761 [
762 '!RIGHTS.TASK_ID' => $tasks[Rights::ACCESS_TYPES['denied']],
763 'RIGHTS.USER_ACCESS.USER_ID' => $uid
764 ],
765 $additionalFilterOr
766 ];
767 }
768 else
769 {
770 $filter['RIGHTS.USER_ACCESS.USER_ID'] = $uid;
771 $filter['!RIGHTS.TASK_ID'] = $tasks[Rights::ACCESS_TYPES['denied']];
772 }
773 }
774 }
775
776 return $filter;
777 }
778
783 public static function isExtendedMode()
784 {
785 if (Manager::isB24())
786 {
787 return Manager::getOption('rights_extended_mode', 'N') == 'Y';
788 }
789 else
790 {
791 return true;
792 }
793 }
794
799 public static function switchMode()
800 {
801 if (self::isFeatureOn())
802 {
803 $current = Manager::getOption('rights_extended_mode', 'N');
804 $current = ($current == 'Y') ? 'N' : 'Y';
805 Manager::setOption('rights_extended_mode', $current);
806 }
807 }
808
814 public static function refreshAdditionalRights(array $additionalRights = [])
815 {
816 if (!self::isFeatureOn())
817 {
818 return;
819 }
820
821 $rights = [];
822 foreach (self::ADDITIONAL_RIGHTS as $right)
823 {
824 $rights[$right] = [];
825 }
826
827 // get additional from all roles
828 $res = Role::getList([
829 'select' => [
830 'ID', 'ACCESS_CODES', 'ADDITIONAL_RIGHTS'
831 ]
832 ]);
833 while ($row = $res->fetch())
834 {
835 $row['ACCESS_CODES'] = (array) $row['ACCESS_CODES'];
836 $row['ADDITIONAL_RIGHTS'] = (array) $row['ADDITIONAL_RIGHTS'];
837 foreach ($row['ADDITIONAL_RIGHTS'] as $right)
838 {
839 if (isset($rights[$right]))
840 {
841 $rights[$right][$row['ID']] = $row['ACCESS_CODES'];
842 }
843 }
844 }
845
846 // refresh options
847 foreach ($rights as $code => $right)
848 {
849 // gets current from option
850 $option = Manager::getOption('access_codes_' . $code, '');
851 $option = unserialize($option, ['allowed_classes' => false]);
852 if (isset($option[0]))
853 {
854 $right[0] = $option[0];
855 }
856
857 // rewrite some rights, if need
858 if (
859 isset($additionalRights[$code]) &&
860 is_array($additionalRights[$code])
861 )
862 {
863 foreach ($additionalRights[$code] as $i => $accCodes)
864 {
865 $right[$i] = (array) $accCodes;
866 }
867 }
868
869 // set new rights in option
870 Manager::setOption('access_codes_' . $code, $right ? serialize($right) : '');
871
872 // clear menu cache
873 if (Manager::isB24())
874 {
875 Manager::getCacheManager()->clearByTag(
876 'bitrix24_left_menu'
877 );
878 Manager::getCacheManager()->cleanDir(
879 'menu'
880 );
881 \CBitrixComponent::clearComponentCache(
882 'bitrix:menu'
883 );
884 }
885 }
886 }
887
894 public static function setAdditionalRightExtended($code, array $accessCodes = [])
895 {
896 if (!is_string($code))
897 {
898 return;
899 }
900 self::refreshAdditionalRights([
901 $code => [
902 0 => $accessCodes
903 ]
904 ]);
905 }
906
912 public static function getAdditionalRightExtended($code)
913 {
914 static $access = null;
915 $return = [];
916
917 if (!is_string($code))
918 {
919 return $return;
920 }
921 if ($access === null)
922 {
923 $access = new \CAccess;
924 }
925
926 $option = Manager::getOption('access_codes_' . $code, '');
927 $option = unserialize($option, ['allowed_classes' => false]);
928 $accessCodes = isset($option[0]) ? (array)$option[0] : [];
929 $codesNames = $access->getNames($accessCodes);
930
931 foreach ($accessCodes as $code)
932 {
933 if (isset($codesNames[$code]))
934 {
935 $provider = (
936 isset($codesNames[$code]['provider']) &&
937 $codesNames[$code]['provider']
938 )
939 ? $codesNames[$code]['provider']
940 : '';
941 $name = isset($codesNames[$code]['name'])
942 ? $codesNames[$code]['name']
943 : $code;
944 $return[$code] = [
945 'CODE' => $code,
946 'PROVIDER' => $provider,
947 'NAME' => $name
948 ];
949 }
950 }
951
952 return $return;
953 }
954
959 public static function getAdditionalRightsLabels()
960 {
961 $rights = [];
962
964
965 foreach (self::ADDITIONAL_RIGHTS as $right)
966 {
967 if (mb_strpos($right, '_') > 0)
968 {
969 [$prefix, ] = explode('_', $right);
970 $prefix = mb_strtoupper($prefix);
971 if ($prefix != $type)
972 {
973 continue;
974 }
975 }
976 else if ($type !== null)
977 {
978 continue;
979 }
980 $rights[$right] = Loc::getMessage('LANDING_RIGHTS_R_'.mb_strtoupper($right));
981 }
982
983 return $rights;
984 }
985
990 protected static function hasExtraRights(): bool
991 {
992 // has context user access to crm forms
993 if (\Bitrix\Main\Loader::includeModule('crm'))
994 {
995 $crmUserPermissions = Container::getInstance()->getUserPermissions(self::getContextUserId());
996 if ($crmUserPermissions->webForm()->canEdit())
997 {
998 // grant access to crm forms sites
999 $res = Site::getList([
1000 'select' => [
1001 'ID'
1002 ],
1003 'filter' => [
1004 '%=CODE' => '/' . Site\Type::PSEUDO_SCOPE_CODE_FORMS . '%',
1005 '=SPECIAL' => 'Y',
1006 'CHECK_PERMISSIONS' => 'N'
1007 ]
1008 ]);
1009 while ($row = $res->fetch())
1010 {
1011 self::$allowedSites[] = $row['ID'];
1012 }
1013
1014 return true;
1015 }
1016 }
1017 return false;
1018 }
1019
1027 public static function hasAdditionalRight($code, $type = null, bool $checkExtraRights = false, bool $strict = false)
1028 {
1029 static $options = [];
1030
1031 if ($checkExtraRights && self::hasExtraRights())
1032 {
1033 return true;
1034 }
1035
1036 if (!is_string($code))
1037 {
1038 return false;
1039 }
1040 if ($type === null)
1041 {
1043 }
1044
1045 if ($type !== null)
1046 {
1047 $type = mb_strtolower($type);
1048 //todo: need fix it: remove if() and add 'mainpage_admin', 'mainpage_menu24' in ADDITIONAL_RIGHTS and check preview.bitrix24.site
1049 if ($type == mb_strtolower(Site\Type::SCOPE_CODE_MAINPAGE))
1050 {
1051 return true;
1052 }
1053 $code = $type . '_' . $code;
1054 }
1055
1056 if (array_key_exists($code, self::ADDITIONAL_RIGHTS))
1057 {
1058 if (!self::isFeatureOn())
1059 {
1060 return true;
1061 }
1062
1063 if (!self::getContextUserId())
1064 {
1065 return false;
1066 }
1067
1068 if (Manager::isAdmin())
1069 {
1070 if (in_array($code, self::REVERSE_RIGHTS))
1071 {
1072 return false;
1073 }
1074 return true;
1075 }
1076
1077 $accessCodes = [];
1078 if (!isset($options[$code]))
1079 {
1080 $options[$code] = Manager::getOption('access_codes_' . $code, '');
1081 $options[$code] = unserialize($options[$code], ['allowed_classes' => false]);
1082 }
1084
1085 if (!is_array($option) && !$strict)
1086 {
1087 return true;
1088 }
1089
1090 if (empty($option))
1091 {
1092 return false;
1093 }
1094
1095 if (self::isExtendedMode())
1096 {
1097 if (isset($option[0]) && is_array($option[0]))
1098 {
1099 $accessCodes = $option[0];
1100 }
1101 }
1102 else
1103 {
1104 if (isset($option[0]))
1105 {
1106 unset($option[0]);
1107 }
1108 foreach ($option as $roleAccess)
1109 {
1110 $accessCodes = array_merge($accessCodes, (array)$roleAccess);
1111 }
1112 $accessCodes = array_unique($accessCodes);
1113 }
1114
1115 if ($accessCodes)
1116 {
1117 static $accessCodesStatic = [];
1118
1119 sort($accessCodes);
1120 $accessCodesStr = implode('|', $accessCodes);
1121
1122 if (array_key_exists($accessCodesStr, $accessCodesStatic))
1123 {
1124 return $accessCodesStatic[$accessCodesStr];
1125 }
1126
1127 $res = UserAccessTable::getList([
1128 'select' => [
1129 'USER_ID'
1130 ],
1131 'filter' => [
1132 '=ACCESS_CODE' => $accessCodes,
1133 'USER_ID' => self::getContextUserId()
1134 ]
1135 ]);
1136 $accessCodesStatic[$accessCodesStr] = (boolean)$res->fetch();
1137 return $accessCodesStatic[$accessCodesStr];
1138 }
1139
1140 return false;
1141 }
1142
1143 return false;
1144 }
1145}
$type
Определения options.php:106
if(!Loader::includeModule('messageservice')) $provider
Определения callback_ednaruimhpx.php:21
static isB24()
Определения manager.php:1135
static getOption($code, $default=null)
Определения manager.php:160
const FEATURE_PERMISSIONS_AVAILABLE
Определения manager.php:42
static setOption($code, $value)
Определения manager.php:171
static getUserId()
Определения manager.php:107
static getCacheManager()
Определения manager.php:89
static isAdmin()
Определения manager.php:135
static checkFeature(string $feature, array $params=array())
Определения manager.php:836
static hasAccessForLanding($landingId, $accessType)
Определения rights.php:580
static setAdditionalRightExtended($code, array $accessCodes=[])
Определения rights.php:894
static setOperationsForSite($siteId, array $rights=[])
Определения rights.php:677
static isOn()
Определения rights.php:125
static hasExtraRights()
Определения rights.php:990
const ADDITIONAL_RIGHTS
Определения rights.php:33
static getAccessTasks()
Определения rights.php:210
static removeDataForSite($siteId)
Определения rights.php:280
static setContextUserId(int $uid)
Определения rights.php:168
static getOperations($entityId, $entityType)
Определения rights.php:400
static setOperations($entityId, $entityType, array $rights=[])
Определения rights.php:626
static removeData($entityId, $entityType)
Определения rights.php:255
static getAccessFilter(array $additionalFilterOr=[])
Определения rights.php:726
static setGlobalOn()
Определения rights.php:116
static getAccessTasksReferences()
Определения rights.php:234
static getDataForSite($siteId, array $preDefined=[])
Определения rights.php:385
static getOperationsForSite($siteId)
Определения rights.php:520
static switchMode()
Определения rights.php:799
static isExtendedMode()
Определения rights.php:783
const REVERSE_RIGHTS
Определения rights.php:55
static setOff()
Определения rights.php:89
static getAllowedSites()
Определения rights.php:158
static getAdditionalRightExtended($code)
Определения rights.php:912
static exist()
Определения rights.php:699
const SET_PREFIX
Определения rights.php:50
static clearContextUserId()
Определения rights.php:177
static $userId
Определения rights.php:83
static getAdditionalRightsLabels()
Определения rights.php:959
static $allowedSites
Определения rights.php:65
static setOn()
Определения rights.php:98
static isFeatureOn()
Определения rights.php:199
const ENTITY_TYPE_SITE
Определения rights.php:16
static isAdmin()
Определения rights.php:145
static getData($entityId, $entityType, array $preDefined=[])
Определения rights.php:295
static hasAdditionalRight($code, $type=null, bool $checkExtraRights=false, bool $strict=false)
Определения rights.php:1027
static $available
Определения rights.php:71
const ACCESS_TYPES
Определения rights.php:21
static hasAccessForSite($siteId, $accessType, $deleted=false)
Определения rights.php:546
static refreshAdditionalRights(array $additionalRights=[])
Определения rights.php:814
static getContextUserId()
Определения rights.php:186
static setGlobalOff()
Определения rights.php:107
static $globalAvailable
Определения rights.php:77
static getExpectedRoleIds()
Определения role.php:558
static getOperationsForSite(int $siteId)
Определения type.php:254
static getCurrentScopeId()
Определения type.php:188
static getList(array $parameters=array())
Определения datamanager.php:431
$right
Определения options.php:8
$options
Определения commerceml2.php:49
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$uid
Определения hot_keys_act.php:8
$filter
Определения iblock_catalog_list.php:54
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
if(!is_array($deviceNotifyCodes)) $access
Определения options.php:174
$siteId
Определения ajax.php:8
$name
Определения menu_edit.php:35
Определения cookies.php:2
$entityId
Определения payment.php:4
return false
Определения prolog_main_admin.php:185
$i
Определения factura.php:643
$items
Определения template.php:224
$option
Определения options.php:1711
$rights
Определения options.php:4
$site
Определения yandex_run.php:614