original_string: public function isAllowedUser($resource, string $action): bool
      {
          $permission = $this->getUserPermission($resource);
  
          return $permission && $permission->can($action);
      }
code: public function isAllowedUser($resource, string $action): bool
      {
          $permission = $this->getUserPermission($resource);
  
          return $permission && $permission->can($action);
      }
code_tokens: public function isAllowedUser ( $ resource , string $ action ) : bool { $ permission = $ this -> getUserPermission ( $ resource ) ; return $ permission && $ permission -> can ( $ action ) ; }
docstring: 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
docstring_tokens: 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 .