コード例 #1
0
ファイル: acl.php プロジェクト: synapsestudios/kohana-acl
<?php

defined('SYSPATH') or die('No direct access allowed.');
// Allow all to access the userguide
ACL::add_rule(ACL::rule()->for_controller('userguide')->allow_all());
// Allow all to access the welcome controller
ACL::add_rule(ACL::rule()->for_controller('welcome')->allow_all());
コード例 #2
0
ファイル: acl.php プロジェクト: synapsestudios/kohana-acl
 /**
  * Remove all previously-added rules
  *
  * @return  void
  */
 public static function clear_rules()
 {
     // Remove all rules
     self::$_rules = array();
     // Decompile existing rules for ACL instances
     ACL::clear_compiled_rules();
     // Re-add a default rule
     ACL::add_rule(ACL::rule());
 }