* @package tao * @deprecated */ class tao_models_classes_accessControl_AclProxy { /** * Returns whenever or not the current user has access to a specified link * * @param string $action * @param string $controller * @param string $extension * @param array $parameters * @return boolean * @deprecated */ public static function hasAccess($action, $controller, $extension, $parameters = []) { $user = common_session_SessionManager::getSession()->getUser(); try { $resolver = ActionResolver::getByControllerName($controller, $extension); $className = $resolver->getController(); } catch (ResolverException $e) { return false; } return AclProxy::hasAccess($user, $className, $action, $parameters); } /** * Does not respect params * * @param string $url * @return boolean */ public static function hasAccessUrl($url) { $user = common_session_SessionManager::getSession()->getUser(); try { $resolver = new ActionResolver($url); return AclProxy::hasAccess($user, $resolver->getController(), $resolver->getAction(), []); $className = $resolver->getController(); } catch (ResolverException $e) { return false; } } }