Exemplo n.º 1
0
 public static function checkRole($minRoleFromPage)
 {
     if (!self::isLogged()) {
         Ausnahme::notAuth();
     }
     if (!self::hasRole($minRoleFromPage)) {
         Ausnahme::notAuthToView();
     }
 }
Exemplo n.º 2
0
 protected function checkIfMethodExists()
 {
     // kalo method nya ada
     if (method_exists($this->activeObj, $this->params[1])) {
         $this->checkRBAC();
         //kalau lolos checkrole kerjakan
         return 1;
     } else {
         Ausnahme::notFound();
     }
 }