(non-PHPdoc)
@see \oat\tao\model\accessControl\func\FuncAccessControl::accessPossible()
558229
public static function accessPossible(User $user, $controller, $action) {
        return self::getImplementation()->accessPossible($user, $controller, $action);
    }
261953
public void safelyDisableAccess(AccessibleObject accessibleObject) {
        assert wasAccessible != null : "accessibility info shall not be null";
        try {
            accessibleObject.setAccessible(wasAccessible);
        } catch (Throwable t) {
            //ignore
        }
    }
1363210
private function validateAccessList() {
        // Get all user lists
        $declaredPublicKeys = array_map(function($acl) {
            return $acl['publicKey'];
        }, $this->accessList);

        $publicKeys = [];
        foreach ($declaredPublicKeys as $key) {
            if (in_array($key, $publicKeys)) {
                throw new InvalidArgumentException('Public key declared twice in config: ' . $key, 500);
            }

            $publicKeys[] = $key;
        }
    }
947833
public function isObjEditable()
    {
        $model = ($this->currentObj) ? $this->currentObj : $this->proto();
        $method = [ $model, 'isEditable' ];

        if (is_callable($method)) {
            return call_user_func($method);
        }

        return true;
    }
260381
function getAccessMode()
    {
        if (!$this->accessMode)
            $this->accessMode = new AccessMode(self::DEFAULT_ACCESS_MODE);

        return $this->accessMode;
    }
786256
public function setAccessKey( $accessKey ) {
		$accessKey = is_string( $accessKey ) && strlen( $accessKey ) ? $accessKey : null;

		if ( $this->accessKey !== $accessKey ) {
			if ( $accessKey !== null ) {
				$this->accessKeyed->setAttributes( [ 'accesskey' => $accessKey ] );
			} else {
				$this->accessKeyed->removeAttributes( [ 'accesskey' ] );
			}
			$this->accessKey = $accessKey;

			// Only if this is a TitledElement
			if ( method_exists( $this, 'updateTitle' ) ) {
				$this->updateTitle();
			}
		}

		return $this;
	}
38676
private void makeAccessible(List<AccessibleObject> nonPublicAccessibleObjects) {

    if (nonPublicAccessibleObjects.size() > 0) {
      final AccessibleObject[] nonPublicAccessibles = new AccessibleObject[nonPublicAccessibleObjects.size()];
      nonPublicAccessibleObjects.toArray(nonPublicAccessibles);
      // enable reflective access that violates visibility - this will
      // fail if disallowed by security-manager.
      AccessController.doPrivileged(new PrivilegedAction<Object>() {

        @Override
        public Object run() {

          AccessibleObject.setAccessible(nonPublicAccessibles, true);
          return null;
        }
      });
    }
  }
928088
public function isObjDeletable()
    {
        if ($this->isObjDeletable === null) {
            // Overridden by permissions
            if (!$this->checkPermission('delete') || !$this->form()) {
                $this->isObjDeletable = false;
            } else {
                $obj = $this->form()->obj();
                $this->isObjDeletable = !!$obj->id();

                $method = [ $obj, 'isDeletable' ];
                if (is_callable($method)) {
                    $this->isObjDeletable = call_user_func($method);
                }
            }
        }

        return $this->isObjDeletable;
    }
1287794
public function setAccessorType($accessorType)
    {
        $allowedValues = $this->getAccessorTypeAllowableValues();
        if (!in_array($accessorType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'accessorType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['accessorType'] = $accessorType;

        return $this;
    }
328119
public function isAccessible($url)
    {
        $context = $this->getContext($url);

        return is_resource(@fopen($url, 'r', null, $context));
    }
1278558
public function isObjResettable()
    {
        if ($this->isObjResettable === null) {
            // Overridden by permissions
            if (!$this->checkPermission('reset') || !$this->form()) {
                $this->isObjResettable = false;
            } else {
                $this->isObjResettable = true;

                $obj    = $this->form()->obj();
                $method = [ $obj, 'isResettable' ];
                if (is_callable($method)) {
                    $this->isObjResettable = call_user_func($method);
                }
            }
        }

        return $this->isObjResettable;
    }
1085105
protected function createAccessor(
        $accessor,
        string $name,
        $value,
        array $context = []
    ): AccessorInterface {
        //Giving ORM as context
        return parent::createAccessor($accessor, $name, $value, $context + ['orm' => $this->orm]);
    }
1146390
protected function canAccess()
    {
        $result = false;
        $page = Page::getByPath('/dashboard/system/basics/editor');
        if ($page && !$page->isError()) {
            $checker = new Checker($page);
            $result = $checker->canViewPage();
        }

        return $result;
    }
799694
public function canAccess($key): bool
    {
        $melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');
        $xmlRights = $melisCoreAuth->getAuthRights();
        $isAccessible = $this->isAccessible($xmlRights, self::MELIS_PLATFORM_TOOLS_PREFIX, $key);

        $isInterfaceAccessible = $this->isAccessible($xmlRights, self::MELISCORE_PREFIX_INTERFACE, $key);

        return $isAccessible && $isInterfaceAccessible;
    }
746746
function canModifyStatus( $statusID, $user = false )
    {
        if ( $user === false )
            $user = eZUser::currentUser();
        else if ( is_numeric( $user ) )
            $user = eZUser::fetch( $user );

        if ( !is_object( $user ) )
        {
            eZDebug::writeError( "Cannot check status access without a user", __METHOD__ );
            return false;
        }

        $accessResult = $user->hasAccessTo( 'shop' , 'setstatus' );
        $accessWord = $accessResult['accessWord'];
        $access = false;

        $currentStatusID = $this->attribute( "status_id" );

        if ( $accessWord == 'yes' )
            $access = true;

        if ( $accessWord == 'limited' )
        {
            $limitationList = $accessResult['policies'];
            $access = true;
            foreach ( $limitationList as $pid => $limit )
            {
                $access = true;
                foreach ( $limit as $name => $value )
                {
                    if ( $name == 'FromStatus' )
                    {
                        if ( !in_array( $currentStatusID, $value )  )
                            $access = false;
                    }
                    if ( $name == 'ToStatus' )
                    {
                        if ( !in_array( $statusID, $value ) )
                            $access = false;
                    }
                    if ( !$access )
                        break;
                }
                if ( $access )
                    break;
            }
        }
        return $access;
    }
112303
function isUsable(?\CharlotteDunois\Livia\Commands\Context $context = null) {
        if($context === null) {
            return $this->globalEnabled;
        }
        
        if($this->guildOnly && $context->message->guild === null) {
            return false;
        }
        
        return ($this->isEnabledIn($context->message->guild) && $this->hasPermission($context) === true);
    }
781627
public function allowMethods(array $excepted)
    {
        if (count($excepted) == 0) {
            throw new AccessControlException(
                'Parameter is empty.',
                E_USER_ERROR
            );
        }

        return $this->push('Access-Control-Allow-Methods', implode(', ', $excepted));
    }