public function isAuthorized(Resource $resource) { if ($this->hasAccessControl()) { if (SessionManager::exists(Role::SESSION_USER_ROLE)) { $role = SessionManager::read(Role::SESSION_USER_ROLE); $this->getAccessControl()->hasAuthority($role, $resource); } else { throw new SecurityException(MessageCode::SECURITY_ACCESS_DENIED); } } }
public function getContextMessage() { return SessionManager::read(__CLASS__); }