public static function checkRole($minRoleFromPage) { if (!self::isLogged()) { Ausnahme::notAuth(); } if (!self::hasRole($minRoleFromPage)) { Ausnahme::notAuthToView(); } }
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(); } }