1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Rights

Открытые статические члены

static setOff ()
static setOn ()
static setGlobalOff ()
static setGlobalOn ()
static isOn ()
static isAdmin ()
static getAllowedSites ()
static setContextUserId (int $uid)
static clearContextUserId ()
static getContextUserId ()
static getAccessTasks ()
static getAccessTasksReferences ()
static removeDataForSite ($siteId)
static getDataForSite ($siteId, array $preDefined=[])
static getOperationsForSite ($siteId)
static hasAccessForSite ($siteId, $accessType, $deleted=false)
static hasAccessForLanding ($landingId, $accessType)
static setOperationsForSite ($siteId, array $rights=[])
static getAccessFilter (array $additionalFilterOr=[])
static isExtendedMode ()
static switchMode ()
static refreshAdditionalRights (array $additionalRights=[])
static setAdditionalRightExtended ($code, array $accessCodes=[])
static getAdditionalRightExtended ($code)
static getAdditionalRightsLabels ()
static hasAdditionalRight ($code, $type=null, bool $checkExtraRights=false, bool $strict=false)

Поля данных

const ENTITY_TYPE_SITE = 'S'
const ACCESS_TYPES
const ADDITIONAL_RIGHTS
const SET_PREFIX
const REVERSE_RIGHTS

Защищенные статические члены

static isFeatureOn ()
static removeData ($entityId, $entityType)
static getData ($entityId, $entityType, array $preDefined=[])
static getOperations ($entityId, $entityType)
static setOperations ($entityId, $entityType, array $rights=[])
static exist ()
static hasExtraRights ()

Статические защищенные данные

static $allowedSites = []
static $available = true
static $globalAvailable = true
static $userId = null

Подробное описание

См. определение в файле rights.php строка 11

Методы

◆ clearContextUserId()

clearContextUserId ( )
static

Clears context user id.

Возвращает
void

См. определение в файле rights.php строка 177

◆ exist()

exist ( )
staticprotected

If any records of rights exists.

Возвращает
bool

См. определение в файле rights.php строка 699

◆ getAccessFilter()

getAccessFilter ( array $additionalFilterOr = [])
static

Gets access filter for current user.

Аргументы
array$additionalFilterOrAdditional filter for OR section.
Возвращает
array

См. определение в файле rights.php строка 726

◆ getAccessTasks()

getAccessTasks ( )
static

Gets tasks for access.

Возвращает
array

См. определение в файле rights.php строка 210

◆ getAccessTasksReferences()

getAccessTasksReferences ( )
static

Gets tasks for access.

Возвращает
array

См. определение в файле rights.php строка 234

◆ getAdditionalRightExtended()

getAdditionalRightExtended ( $code)
static

Gets additional right.

Аргументы
string$codeCode from ADDITIONAL_RIGHTS.
Возвращает
array

См. определение в файле rights.php строка 912

◆ getAdditionalRightsLabels()

getAdditionalRightsLabels ( )
static

Gets additional rights with labels.

Возвращает
array

См. определение в файле rights.php строка 959

◆ getAllowedSites()

getAllowedSites ( )
static

Returns allowed sites with full access.

Возвращает
int[]

См. определение в файле rights.php строка 158

◆ getContextUserId()

getContextUserId ( )
static

Returns context user id (current by default).

Возвращает
int

См. определение в файле rights.php строка 186

◆ getData()

getData ( $entityId,
$entityType,
array $preDefined = [] )
staticprotected

Get all rows for entity.

Аргументы
int | array$entityIdEntity id (id or array of id).
string$entityTypeEntity type.
array$preDefinedPredefined array of rights.
Возвращает
array

См. определение в файле rights.php строка 295

◆ getDataForSite()

getDataForSite ( $siteId,
array $preDefined = [] )
static

Get all rows for site.

Аргументы
int | array$siteIdSite id (id or array of id).
array$preDefinedPredefined array of rights.
Возвращает
array

См. определение в файле rights.php строка 385

◆ getOperations()

getOperations ( $entityId,
$entityType )
staticprotected

Get all available operations for entity (for current user).

Аргументы
int | array$entityIdEntity id (id or array of id).
string$entityTypeEntity type.
Возвращает
array

См. определение в файле rights.php строка 400

◆ getOperationsForSite()

getOperationsForSite ( $siteId)
static

Returns all available operations for site (for current user).

Аргументы
int | array$siteIdSite id (id or array of id).
Возвращает
array

См. определение в файле rights.php строка 520

◆ hasAccessForLanding()

hasAccessForLanding ( $landingId,
$accessType )
static

Can current user do something.

Аргументы
int$landingIdLanding id.
string$accessTypeAccess type code.
Возвращает
boolean

См. определение в файле rights.php строка 580

◆ hasAccessForSite()

hasAccessForSite ( $siteId,
$accessType,
$deleted = false )
static

Can current user do something.

Аргументы
int$siteIdSite id.
string$accessTypeAccess type code.
bool$deletedAnd from recycle bin.
Возвращает
boolean

См. определение в файле rights.php строка 546

◆ hasAdditionalRight()

hasAdditionalRight ( $code,
$type = null,
bool $checkExtraRights = false,
bool $strict = false )
static

Has current user additional right or not.

Аргументы
string$codeCode from ADDITIONAL_RIGHTS.
string$typeScope type.
bool$checkExtraRightsCheck extra rights.
Возвращает
bool

См. определение в файле rights.php строка 1027

◆ hasExtraRights()

hasExtraRights ( )
staticprotected

Has user some extra access?

Возвращает
bool

См. определение в файле rights.php строка 990

◆ isAdmin()

isAdmin ( )
static

Current user is admin or not.

Возвращает
bool

См. определение в файле rights.php строка 145

◆ isExtendedMode()

isExtendedMode ( )
static

Extended mode available.

Возвращает
bool

См. определение в файле rights.php строка 783

◆ isFeatureOn()

isFeatureOn ( )
staticprotected

Available or not permission feature by current plan.

Возвращает
bool

См. определение в файле rights.php строка 199

◆ isOn()

isOn ( )
static

Check current status for checking rights.

Возвращает
bool

См. определение в файле rights.php строка 125

◆ refreshAdditionalRights()

refreshAdditionalRights ( array $additionalRights = [])
static

Refresh additional rights for all roles.

Аргументы
array$additionalRightsArray for set additional.
Возвращает
void

См. определение в файле rights.php строка 814

◆ removeData()

removeData ( $entityId,
$entityType )
staticprotected

Remove all rows for entity.

Аргументы
int | array$entityIdEntity id (id or array of id).
string$entityTypeEntity type.
Возвращает
void

См. определение в файле rights.php строка 255

◆ removeDataForSite()

removeDataForSite ( $siteId)
static

Remove all rows for site.

Аргументы
int | array$siteIdSite id (id or array of id).
Возвращает
void

См. определение в файле rights.php строка 280

◆ setAdditionalRightExtended()

setAdditionalRightExtended ( $code,
array $accessCodes = [] )
static

Set additional right.

Аргументы
string$codeCode from ADDITIONAL_RIGHTS.
array$accessCodesAdditional rights array.
Возвращает
void

См. определение в файле rights.php строка 894

◆ setContextUserId()

setContextUserId ( int $uid)
static

Sets context user id.

Аргументы
int$uid
Возвращает
void

См. определение в файле rights.php строка 168

◆ setGlobalOff()

setGlobalOff ( )
static

Set rights checking to 'no' (global mode).

Возвращает
void

См. определение в файле rights.php строка 107

◆ setGlobalOn()

setGlobalOn ( )
static

Set rights checking to 'yes' (global mode).

Возвращает
void

См. определение в файле rights.php строка 116

◆ setOff()

setOff ( )
static

Set rights checking to 'no'.

Возвращает
void

См. определение в файле rights.php строка 89

◆ setOn()

setOn ( )
static

Set rights checking to 'yes'.

Возвращает
void

См. определение в файле rights.php строка 98

◆ setOperations()

setOperations ( $entityId,
$entityType,
array $rights = [] )
staticprotected

Set operations for entity.

Аргументы
int$entityIdEntity id.
string$entityTypeEntity type.
array$rightsRights array (set empty for clear rights).
Возвращает
boolean

См. определение в файле rights.php строка 626

◆ setOperationsForSite()

setOperationsForSite ( $siteId,
array $rights = [] )
static

Set operations for site.

Аргументы
int$siteIdSite id.
array$rightsRights array (set empty for clear rights).
Возвращает
bool

См. определение в файле rights.php строка 677

◆ switchMode()

switchMode ( )
static

Switch extended mode.

Возвращает
void

См. определение в файле rights.php строка 799

Поля

◆ $allowedSites

$allowedSites = []
staticprotected

См. определение в файле rights.php строка 65

◆ $available

$available = true
staticprotected

См. определение в файле rights.php строка 71

◆ $globalAvailable

$globalAvailable = true
staticprotected

См. определение в файле rights.php строка 77

◆ $userId

$userId = null
staticprotected

См. определение в файле rights.php строка 83

◆ ACCESS_TYPES

const ACCESS_TYPES
Инициализатор
= [
'denied' => 'denied',
'read' => 'read',
'edit' => 'edit',
'sett' => 'sett',
'public' => 'public',
'delete' => 'delete'
]

Access types for different levels.

См. определение в файле rights.php строка 21

◆ ADDITIONAL_RIGHTS

const ADDITIONAL_RIGHTS
Инициализатор
= [
'menu24' => 'menu24',
'admin' => 'admin',
'create' => 'create',
'unexportable' => 'unexportable',
'knowledge_menu24' => 'knowledge_menu24',
'knowledge_admin' => 'knowledge_admin',
'knowledge_create' => 'knowledge_create',
'knowledge_unexportable' => 'knowledge_unexportable',
'knowledge_extension' => 'knowledge_extension',
'group_create' => 'group_create',
'group_admin' => 'group_admin',
'group_menu24' => 'group_menu24',
'group_unexportable' => 'group_unexportable',
'mainpage_create' => 'mainpage_create',
]

Additional rights for some functionality.

См. определение в файле rights.php строка 33

◆ ENTITY_TYPE_SITE

const ENTITY_TYPE_SITE = 'S'

Site entity type.

См. определение в файле rights.php строка 16

◆ REVERSE_RIGHTS

const REVERSE_RIGHTS
Инициализатор
= [
'unexportable',
'knowledge_unexportable',
'group_unexportable',
]

См. определение в файле rights.php строка 55

◆ SET_PREFIX

const SET_PREFIX
Инициализатор
= [
'knowledge',
'group',
]

См. определение в файле rights.php строка 50


Объявления и описания членов класса находятся в файле: