Exemplo n.º 1
0
 public function allowed_paths()
 {
     $paths = array();
     foreach ($this->roles() as $role) {
         $paths = array_merge($paths, Rules::paths_for_role($role));
     }
     return array_values(array_unique($paths));
 }
 public static function is_gaurded($uri)
 {
     foreach (Rules::all_paths() as $p) {
         if (starts_with($uri, $p)) {
             return true;
         }
     }
     return false;
 }