yii2

Форк
1
/
CheckAccessInterface.php 
29 строк · 1.1 Кб
1
<?php
2
/**
3
 * @link https://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license https://www.yiiframework.com/license/
6
 */
7

8
namespace yii\rbac;
9

10
/**
11
 * For more details and usage information on CheckAccessInterface, see the [guide article on security authorization](guide:security-authorization).
12
 *
13
 * @author Sam Mousa <sam@mousa.nl>
14
 * @since 2.0.9
15
 */
16
interface CheckAccessInterface
17
{
18
    /**
19
     * Checks if the user has the specified permission.
20
     * @param string|int $userId the user ID. This should be either an integer or a string representing
21
     * the unique identifier of a user. See [[\yii\web\User::id]].
22
     * @param string $permissionName the name of the permission to be checked against
23
     * @param array $params name-value pairs that will be passed to the rules associated
24
     * with the roles and permissions assigned to the user.
25
     * @return bool whether the user has the specified permission.
26
     * @throws \yii\base\InvalidParamException if $permissionName does not refer to an existing permission
27
     */
28
    public function checkAccess($userId, $permissionName, $params = []);
29
}
30

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.