ACL requests accessor

@return Application\AclRequests
173592
public function acls()
    {
        if (is_null($this->aclRequests)) {
            $this->aclRequests = new AclRequests($this->client);
        }

        return $this->aclRequests;
    }
1372000
public function getAccessListItems()
    {
        $obj = $this->getPermissionAccessObject();
        if (!$obj) {
            return [];
        }
        $args = func_get_args();
        switch (count($args)) {
            case 0:
                return $obj->getAccessListItems();
            case 1:
                return $obj->getAccessListItems($args[0]);
            case 2:
                return $obj->getAccessListItems($args[0], $args[1]);
            case 3:
                return $obj->getAccessListItems($args[0], $args[1], $args[2]);
            default:
                return call_user_func_array([$obj, 'getAccessListItems'], $args);
        }
    }
985806
public function getAcl() {
        $options = $this->getOptions();
        if ($this->_acl === null) {
            $this->_acl = Zend_Registry::isRegistered(self::DEFAULT_REGISTRY_KEY) ?
                Zend_Registry::get(self::DEFAULT_REGISTRY_KEY) : new Zend_Acl();


            $roles = array();
            $resources = array();

            if (isset($options['roles'])) {
                $roles = $options['roles'];
            }

            if (isset($options['resources'])) {
                $resources = $options['resources'];
            }

            $this->_addRoles($roles);
            $this->_addResources($resources);
        }

        return $this->_acl;
    }
722458
public function requestAccessToken()
    {
        $config = $this->getConfig();

        $token_url = $config['urls']['token'];
        $params = array();
        $params['client_id'] = $config['api_key'];
        $params['redirect_uri'] = $this->getRedirect();
        $params['code'] = $this->getCode();
        $params['grant_type'] = 'authorization_code';
        $params['client_secret'] = $config['secret_key'];

        //get access token
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $token_url);
        curl_setopt($ch, CURLOPT_VERBOSE, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);  // don't worry about bad ssl certs
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));  // @todo why post a get query?

        $response = curl_exec($ch);

        if (!$response) {
            throw new \Exception('no response from linkedin');
        }

        $response = json_decode($response);
        if (!isset($response->access_token) || !$response->access_token) {
            throw new \Exception('no access token received from linkedin');
        }

        $this->setAccessToken($response->access_token);

        return (string) $response->access_token;
    }
483844
public function getAccessor()
    {
        if ($this->accessor) {
            return $this->accessor;
        }

        $this->accessor = new DocumentAccessor($this->getDocument());

        return $this->accessor;
    }
1169512
public function permissionsToRegister()
    {
        $config = config('acl');
        $permissionPlaceholders = array_get($config, 'permission_placeholders');
        $additionalPermissions = array_get($config, 'additional');
        $permissionsToRegister = [];

        $routes = array_filter($this->router->getRoutes()->getRoutes(), function ($route) {
            return $route->getName() and ! in_array($route->getName(), AclPolicy::getExcept());
        });

        foreach ($routes as $route) {
            if (array_key_exists($route->getName(), $permissionPlaceholders)) {
                $permissionsToRegister[$route->getName()] = $permissionPlaceholders[$route->getName()];
            } else {
                $permissionsToRegister[$route->getName()] = $route->getName();
            }
        }

        return array_merge($permissionsToRegister, $additionalPermissions);
    }
742358
public function getAuthRoutes()
    {
        $menu = $this->getMenu();
         
        if (!$menu) {
            return $this->extendPermissionRoutes();
        }
        
        return ArrayHelper::merge($this->extendPermissionRoutes(), $menu->getPermissionRoutes());
    }
272210
public function getPermissionsIdList() {

		$permissions		= $this->permissionMappingList;
		$permissionsList	= [];

		foreach ( $permissions as $permission ) {

			array_push( $permissionsList, $permission->permissionId );
		}

		return $permissionsList;
	}
24762
public function getAccessToken()
    {
        /** @var AccessToken $accessToken */
        if ($accessToken = $this->cache->get(static::SESSION_ACCESS_TOKEN_KEY)) {
            if (!$accessToken->hasExpired()) {
                return $accessToken;
            }
        }
        $accessToken = $this->authClient->getAccessToken('client_credentials');
        $ttl = $accessToken->getExpires() - time();
        $this->cache->save(static::SESSION_ACCESS_TOKEN_KEY, $accessToken, $ttl);

        return $accessToken;
    }
941074
private final function loadAcl(): void
    {
        $this->acl = new Acl($this);

        $rules = $this->config->get('acl.rules');
        if ($rules != null) {
            $this->acl->setRules($rules);
        }
    }
1188373
public function getChildACL()
    {
        $acl = [];

        switch ($this->getShareAccess()) {
            case SPlugin::ACCESS_NOTSHARED:
            case SPlugin::ACCESS_SHAREDOWNER:
            case SPlugin::ACCESS_READWRITE:
                $acl[] = [
                    'privilege' => '{DAV:}write',
                    'principal' => $this->calendarInfo['principaluri'],
                    'protected' => true,
                ];
                $acl[] = [
                    'privilege' => '{DAV:}write',
                    'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
                    'protected' => true,
                ];
                // no break intentional
            case SPlugin::ACCESS_READ:
                $acl[] = [
                    'privilege' => '{DAV:}read',
                    'principal' => $this->calendarInfo['principaluri'],
                    'protected' => true,
                ];
                $acl[] = [
                    'privilege' => '{DAV:}read',
                    'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
                    'protected' => true,
                ];
                $acl[] = [
                    'privilege' => '{DAV:}read',
                    'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-read',
                    'protected' => true,
                ];
                break;
        }

        return $acl;
    }
1322161
public function getAccessToken()
    {
        if (! $this->accessTokenEntity instanceof AccessTokenEntity) {
            $this->accessTokenEntity = $this->server->getAccessTokenStorage()->get($this->accessTokenId);
        }

        return $this->accessTokenEntity;
    }
695210
public function putACLRequest($options=array())
    {
        $operation = array(
            'API' => 'PutBucketACL',
            'Method' => 'PUT',
            'Uri' => '/<bucket-name>?acl',
            'Headers' => array(
                'Host' => $this->properties['zone'] . '.' . $this->config->host,
            ),
            'Params' => array(
            ),
            'Elements' => array(
                'acl' => isset($options['acl'])?$options['acl']:null,
            ),
            'Properties' => $this->properties,
            'Body' => null
        );
        $this->putACLValidate($operation);
        $req = new Request($this->config, $operation);
        return $req;
    }
1118128
protected function getIpAccessControlLists() {
        if (!$this->_ipAccessControlLists) {
            $this->_ipAccessControlLists = new IpAccessControlListList(
                $this->version,
                $this->solution['accountSid']
            );
        }

        return $this->_ipAccessControlLists;
    }
336427
public function getPermissionAccessObject()
    {
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        $identifier = sprintf(
            'permission/assignment/access/%s/%s',
            $this->pk->getPermissionKeyHandle(),
            $this->getPermissionObject()->getPermissionObjectIdentifier()
        );
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            return $item->get();
        }
        $db = $app->make(Connection::class);
        $r = $db->fetchColumn('select paID from PagePermissionAssignments where cID = ? and pkID = ?', [$this->getPermissionObject()->getPermissionsCollectionID(), $this->pk->getPermissionKeyID()]);
        $pa = $r ? Access::getByID($r, $this->pk, false) : null;
        if ($pa) {
            $permissionObject = $this->getPermissionObject();
            if ($permissionObject->isPageDraft() && $permissionObject->getCollectionInheritance() == 'PARENT' && isset($this->inheritedPageTypeDraftPermissions[$this->pk->getPermissionKeyHandle()])) {
                $pageType = $permissionObject->getPageTypeObject();
                if (is_object($pageType)) {
                    $pk = Key::getByHandle($this->inheritedPageTypeDraftPermissions[$this->pk->getPermissionKeyHandle()]);
                    $pk->setPermissionObject($pageType);
                    $access = $pk->getPermissionAccessObject();
                    if (is_object($access)) {
                        $list_items = $access->getAccessListItems();
                        $pa->setListItems($list_items);
                    }
                }
            }
        }
        $cache->save($item->set($pa));

        return $pa;
    }
1246022
final public function getAuthority()
    {

        $self = $this;
        $auth = $self->get("handler", "auth");

        //$authority = \Platform\Authorize::getInstance();

        if (is_a($auth, Authenticate::class)) {
            if (isset($auth->authenticated)) {
                //Read Rights if we have a userId
                //$self->authority = $authority->getPermissions($auth);
            }
        }

        //return $self->authority;
    }
316924
public static function makePublic() {
    $acl = new ACL();
    $acl->addReferrer(self::READ, '*');
    $acl->allowListings();

    return $acl;
  }