Beispiel #1
0
 public function before()
 {
     // Check whether this controller (fills in current action automatically) can be accessed
     Wi3::inst()->acl->grant("*", $this, "login");
     // Everybody can access login and logout function in this controller
     Wi3::inst()->acl->grant("*", $this, "logout");
     Wi3::inst()->acl->grant("admin", $this);
     // Admin can access every function in this controller
     Wi3::inst()->acl->check($this);
     // Don't cache these pages
     Wi3::inst()->cache->doNotCache();
     parent::before();
 }
Beispiel #2
0
 public function before()
 {
     // Set rules for this controller
     Wi3::inst()->acl->grant("*", $this, "login");
     // Grant everybody access to the login function
     Wi3::inst()->acl->grant("*", $this, "logout");
     Wi3::inst()->acl->grant("superadmin", $this);
     // Check whether this controller (fills in current action automatically) can be accessed
     Wi3::inst()->acl->check($this);
     // Don't cache these pages
     Wi3::inst()->cache->doNotCache();
     parent::before();
 }