Exemple #1
0
 public static function isHandlerPermitted($resource, $action)
 {
     if (!Access::isPrivate($resource, $action)) {
         return true;
     }
     if (empty(self::$config)) {
         self::$config = Config::load('access');
     }
     $group = '';
     if (!empty(self::$config['auth'])) {
         $cl = self::$config['auth'];
         $cl::init();
         if (!$cl::check()) {
             return false;
         }
         $group = $cl::group();
     }
     return Access::isPermitted($resource, $action, $group);
 }
Exemple #2
0
 public static function isHandlerPermitted($resource, $action)
 {
     if (!Access::isPrivate($resource, $action)) {
         return true;
     }
     return Access::isPermitted($resource, $action);
 }