public function isAllowedUser($resource, string $action): bool
    {
        $permission = $this->getUserPermission($resource);

        return $permission && $permission->can($action);
    }
public function isAllowedUser($resource, string $action): bool
    {
        $permission = $this->getUserPermission($resource);

        return $permission && $permission->can($action);
    }
public function isAllowedUser ( $ resource , string $ action ) : bool { $ permission = $ this -> getUserPermission ( $ resource ) ; return $ permission && $ permission -> can ( $ action ) ; }
Similar to isAllowed, this method checks user-rules specifically.  If there is no user in session, and this
method is called directly, a UserRequiredException will be thrown.

isAllowed, will pass the buck to this method if no group rules satisfy the action.

@param ResourceInterface|string $resource
@param string                   $action

@return bool
@throws \Exception
@throws UnknownResourceTypeException
@throws UserRequiredException
Similar to isAllowed this method checks user - rules specifically . If there is no user in session and this method is called directly a UserRequiredException will be thrown .