yii\rbac\CheckAccessInterface::checkAccess PHP Method

checkAccess() public method

Checks if the user has the specified permission.
public checkAccess ( string | integer $userId, string $permissionName, array $params = [] ) : boolean
$userId string | integer the user ID. This should be either an integer or a string representing the unique identifier of a user. See [[\yii\web\User::id]].
$permissionName string the name of the permission to be checked against
$params array name-value pairs that will be passed to the rules associated with the roles and permissions assigned to the user.
return boolean whether the user has the specified permission.
    public function checkAccess($userId, $permissionName, $params = []);
CheckAccessInterface