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); }
private static function sort() { usort(self::$data, function ($a, $b) { return $b[self::ACCESS_FIELD_PRIORITY] - $a[self::ACCESS_FIELD_PRIORITY]; }); self::$sorted = true; }