/** * If current user has access */ public function hasAccess() { if (is_null($this->hasAccess)) { $this->hasAccess = zbase_auth_check_access($this->_v('access', zbase_auth_minimum())); } return $this->hasAccess; }
/** * Check if current user has access to this ui * string|array * string: minimum|admin * "minimum" is the minimum role for the current section, else a role name or array of role names * array: [admin, user] * if array, current user role should be one in the array * @return boolean */ public function hasAccess() { if (is_null($this->_hasAccess)) { $this->_hasAccess = zbase_auth_check_access($this->getAccess()); } return $this->_hasAccess; }
/** * Check if user is of $role Role * @return boolean */ function zbase_auth_is($role) { return zbase_auth_check_access($role); }