{@inheritdoc}

@see \Concrete\Controller\Backend\UserInterface::canAccess()
172411
public function canAccess()
    {
        if (!$this->app->make('config')->get('concrete.updates.enable_permissions_protection')) {
            return true; // we have turned this off temporarily which means anyone even non-logged-in users can run update.
        }

        $p = new Checker();

        return $p->canUpgrade();
    }
953849
public function hasAccess(User $user, $controller, $action, $requestParameters) {
        $required = array();
        try {
            // $rights = ServiceManager::getServiceManager()->get(RouteAnnotationService::SERVICE_ID)->getRights($controller, $action);
            // todo use $rights when PHPDoc Annotations will be moved to the Doctrines annotations
            $requiredRights = ControllerHelper::getRequiredRights($controller, $action);
            $uris = $this->extractAndGroupUriFromParameters($requestParameters, array_keys($requiredRights));

            foreach($uris as $name => $urisValue) {
                $required[] = array_fill_keys($urisValue, $requiredRights[$name]);
            }
        } catch (ActionNotFoundException $e) {
            // action not found, no access
            return false;
        }
        
        return empty($required)
            ? true
            : $this->hasPrivileges($user, array_merge(...$required));
    }
1035464
public function canView($member = null)
    {
        if (!$member && $member !== false) {
            $member = Security::getCurrentUser();
        }

        if (!parent::canView($member)) {
            return false;
        }

        foreach ($this->Reports() as $report) {
            if ($report->canView($member)) {
                return true;
            }
        }

        return false;
    }
537366
public function can($permissionName, $params = [], $allowCaching = true)
    {
        // check for auth manager rbac
        // copied from \yii\web\User
        $auth = Yii::$app->getAuthManager();
        if ($auth) {
            if ($allowCaching && empty($params) && isset($this->permissionCache[$permissionName])) {
                return $this->permissionCache[$permissionName];
            }
            $access = $auth->checkAccess($this->getId(), $permissionName, $params);
            if ($allowCaching && empty($params)) {
                $this->permissionCache[$permissionName] = $access;
            }
            return $access;
        }

        // otherwise use our own custom permission (via the role table)
        return $this->role->checkPermission($permissionName);
    }
1295392
public function can($attribute, $value, $parameters, $validator)
    {
        $validator->setFallbackMessages(['auzo.can' => trans('auzoTools::validation.can')]);
        $ability = $parameters[0];

        return \Auth::check() && \Auth::user()->can($ability, app(Request::class));
    }
725242
public function can($ability, $arguments = [])
    {
        return app(Gate::class)->forUser($this)->check($ability, $arguments);
    }
342183
public static function hasAccessUrl($url) {
        $user = common_session_SessionManager::getSession()->getUser();
        try {
            $resolver  = new ActionResolver($url);
            return AclProxy::hasAccess($user, $resolver->getController(), $resolver->getAction(), array());
            $className = $resolver->getController();
        } catch (ResolverException $e) {
            return false;
        }
    }
1210447
public function canView($member = null)
    {
        if (parent::canView($member)) {
            return true;
        }

        if (Subsite::all_accessible_sites()->count() > 0) {
            return true;
        }

        return false;
    }
327052
public function checkAccess($action, $access = null, $param = null) {
		return $this->domain->rbac->checkAccess($action, $access, $param);
	}
256196
public function can($ability, $arguments = [])
    {
        foreach ($this->abilities as $check) {
            if (fnmatch($check, $ability)) {
                return true;
            }
        }

        return false;
    }
1365337
public function can($permission, $model, $withExceptions = false)
    {
        if (!is_array($permission)) $permission = [$permission];

        $can = collect($this->object->execute_kw($this->db, $this->uid, $this->password,
            $model, 'check_access_rights',
            $permission, array('raise_exception' => $withExceptions)));

        return $this->makeResponse($can, 0, 'boolean');
    }
1319285
public function can($permission, $allowAny = false)
    {
        if ($allowAny) {
            return $this->hasAnyAccess(
                is_array($permission) ? $permission : [ $permission ]
            );
        }

        return $this->hasAccess(
            is_array($permission) ? $permission : [ $permission ]
        );
    }
82508
public function permitted($options = []) : bool {
		// authorized
		if (\User::authorized()) {
			// see if controller is for authorized
			if (empty($this->acl['authorized'])) return false;
			// permissions
			if (!empty($this->acl['permission'])) {
				// determine action
				switch ($this->method_code) {
					case 'Edit': $action = 'Record_View'; break;
					case 'Index': $action = 'List_View'; break;
					case 'Activate': $action = 'Activate_Data'; break;
					// if we need to alter menu name
					case 'JsonMenuName':
					case 'JsonMenuName2':
					case 'JsonMenuName3':
					case 'JsonMenuName4':
					case 'JsonMenuName5':
						foreach (['Edit' => 'Record_View', 'Index' => 'List_View', 'Activate' => 'Activate_Data'] as $k => $v) {
							if ($this->can($v, $k)) {
								return true;
							}
						}
						return false;
						break;
				}
				return $this->can($action);
			}
		} else {
			// we need to redirect to login controller if not authorized
			if (($options['redirect'] ?? false) && !empty($this->acl['authorized']) && empty($this->acl['public']) && !\Application::get('flag.global.__skip_session')) {
				\Request::redirect(\Object\ACL\Resources::getStatic('authorization', 'login', 'url'));
			}
			// public permission
			if (empty($this->acl['public'])) {
				return false;
			}
		}
		return true;
	}
326383
public function hasAccess() {

        \common_Logger::w('Call to deprecated method ' . __METHOD__ . ' in ' . __CLASS__);

        $access = true;
        if (!empty($this->data['url'])) {
			$access = tao_models_classes_accessControl_AclProxy::hasAccess(
				$this->data['action'],
				$this->data['controller'],
				$this->data['extension']
			);
        }
        return $access;
    }
381293
function canHide( )
    {
        if ( !isset( $this->Permissions["can_hide"] ) )
        {
            $this->Permissions["can_hide"] = $this->checkAccess( 'hide' );
        }
        return ( $this->Permissions["can_hide"] == 1 );
    }
161384
public function canAccessObject($action, $object)
    {
        return $object && $this->id($object) && $this->hasAccess($action, $object);
    }
1358112
public function hasAccess(User $user, $controller, $action, $parameters) {
        return self::accessPossible($user, $controller, $action);
    }