Update existing acl for quota by id

@param int $quotaId
@param int $aclId
@param AclBuilder $input
@param array $queryParams
@return AclResponse
541661
public function update($quotaId, $aclId, AclBuilder $input, array $queryParams = [])
    {
        $response = $this->api->quotas()->acls()->update($quotaId, $aclId, $input->toArray(), $queryParams);

        return new AclResponse($response);
    }
313200
public static void setQuota(final GreenMailUser user, final Quota quota) {
        Session session = GreenMailUtil.getSession(ServerSetupTest.IMAP);
        try {
            Store store = session.getStore("imap");
            store.connect(user.getEmail(), user.getPassword());
            try {
                ((QuotaAwareStore) store).setQuota(quota);
            } finally {
                store.close();
            }
        } catch (Exception ex) {
            throw new IllegalStateException("Can not set quota " + quota
                    + " for user " + user, ex);
        }
    }
1315606
public function getById($clientId, array $queryParams = [])
    {
        $response = $this->api->oauth2()->clients()->getById($clientId, $queryParams);

        return new ClientResponse($response);
    }
993326
public function create(array $input, array $queryParams = [])
    {
        $response = $this->client->post($this->uri(), [
            RequestOptions::JSON => ['application' => $input],
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
446094
public void performUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) {
        SPARQLQueryDefinition qdef = sparqlManager.newQueryDefinition(queryString);
        if(notNull(baseURI) && !baseURI.isEmpty()){ qdef.setBaseUri(baseURI);}
        if (notNull(ruleset) ) {qdef.setRulesets(ruleset);}
        if(notNull(graphPerms)){ qdef.setUpdatePermissions(graphPerms);}
        qdef.setIncludeDefaultRulesets(includeInferred);
        sparqlManager.clearPageLength();
        sparqlManager.executeUpdate(qdef, tx);
    }
688447
public function update($appId, ApplicationBuilder $input, array $queryParams = [])
    {
        $response = $this->api->applications()->update($appId, $input->toArray(), $queryParams);

        return new ApplicationResponse($response);
    }
714600
public function addReplaceQueryParameters(array $queryParams)
        {
            $queryParams = array_merge($this->getQueryAsArray(), $queryParams);

            return $this->setQuery($queryParams);
        }
955989
public function update($callbackId, CallbackBuilder $input, array $queryParams = [])
    {
        $response = $this->api->callbacks()->update($callbackId, $input->toArray(), $queryParams);

        return new CallbackResponse($response);
    }
1047268
protected function doApplyPermission(MutableAclInterface $acl, PermissionContextInterface $context, $replace_existing = false)
    {
        $type = $context->getPermissionType();
        $field = $context->getField();
        if (is_null($field)) {
            $aceCollection = $this->getAceCollection($acl, $type);
        } else {
            $aceCollection = $this->getFieldAceCollection($acl, $type, $field);
        }
        $size = count($aceCollection) - 1;
        reset($aceCollection);
        for ($i = $size; $i >= 0; $i--) {
            if ($replace_existing) {
                // Replace all existing permissions with the new one
                if ($context->hasDifferentPermission($aceCollection[$i])) {
                    // The ACE was found but with a different permission. Update it.
                    if (is_null($field)) {
                        $acl->{"update{$type}Ace"}($i, $context->getMask());
                    } else {
                        $acl->{"update{$type}FieldAce"}($id, $field, $context-getMask());
                    }
                    //No need to proceed further because the acl is updated
                    return;
                } else {
                    if ($context->equals($aceCollection[$i])) {
                        // The exact same ACE was found. Nothing to do.
                        return;

                    }
                }
            } else {
                if ($context->equals($aceCollection[$i])) {
                    // The exact same ACE was found. Nothing to do.
                    return;
                }
            }
        }
        //If we come this far means we have to insert ace
        if (is_null($field)) {
            $acl->{"insert{$type}Ace"}($context->getSecurityIdentity(),
                    $context->getMask(), 0, $context->isGranting());
        } else {
            $acl->{"insert{$type}FieldAce"}($field, $context->getSecurityIdentity(),
                    $context->getMask(), 0, $context->isGranting());
        }
    }
261749
private function askForAnotherAclRule(InputInterface $input, OutputInterface $output) {
        return $this->getHelper('question')->ask($input, $output, new ConfirmationQuestion(
            'Create more ACL-rules for this public key? (y/N) ',
            false
        ));
    }
53630
public function update($appId, $profileId, ProfileBuilder $input, array $queryParams = [])
    {
        $response = $this->api->applications()->profiles()->update($appId, $profileId, $input->toArray(), $queryParams);

        return new ProfileResponse($response);
    }
836900
public function update($appId, $aclId, AclBuilder $input, array $queryParams = [])
    {
        $response = $this->api->applications()->acls()->update($appId, $aclId, $input->toArray(), $queryParams);

        return new AclResponse($response);
    }
1008209
public function apply(QueryBuilder $queryBuilder, PermissionDefinition $permissionDef)
    {
        $whereQueryParts = $queryBuilder->getDQLPart('where');
        if (empty($whereQueryParts)) {
            $queryBuilder->where('1 = 1'); // this will help in cases where no where query is specified
        }

        $query = $this->cloneQuery($queryBuilder->getQuery());

        $builder = new MaskBuilder();
        foreach ($permissionDef->getPermissions() as $permission) {
            $mask = constant(get_class($builder) . '::MASK_' . strtoupper($permission));
            $builder->add($mask);
        }
        $query->setHint('acl.mask', $builder->get());
        $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Kunstmaan\AdminBundle\Helper\Security\Acl\AclWalker');

        $rootEntity = $permissionDef->getEntity();
        $rootAlias = $permissionDef->getAlias();
        // If either alias or entity was not specified - use default from QueryBuilder
        if (empty($rootEntity) || empty($rootAlias)) {
            $rootEntities = $queryBuilder->getRootEntities();
            $rootAliases = $queryBuilder->getRootAliases();
            $rootEntity = $rootEntities[0];
            $rootAlias = $rootAliases[0];
        }
        $query->setHint('acl.root.entity', $rootEntity);
        $query->setHint('acl.extra.query', $this->getPermittedAclIdsSQLForUser($query));

        $classMeta = $this->em->getClassMetadata($rootEntity);
        $entityRootTableName = $this->quoteStrategy->getTableName(
            $classMeta,
            $this->em->getConnection()->getDatabasePlatform()
        );
        $query->setHint('acl.entityRootTableName', $entityRootTableName);
        $query->setHint('acl.entityRootTableDqlAlias', $rootAlias);

        return $query;
    }
616805
public function update($appId, $scanId, array $input, array $queryParams = [], $defaultInput = true)
    {
        if ($defaultInput) {
            $params = ['scan' => $input];
        } else {
            $params = $input;
        }

        $response = $this->client->patch("{$this->uri($appId)}/{$scanId}", [
            RequestOptions::JSON => $params,
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
1227833
public function filterUserAccessibleByIds(\ACL $userACL, array $feedIds = [])
    {
        $qb = $this->createQueryBuilder('f');

        // is public feed?
        $orx = $qb->expr()->orX(
            $qb->expr()->isNull('f.baseId'),
            $qb->expr()->eq('f.public', $qb->expr()->literal(true))
        );

        // is granted base?
        $grantedBases = array_keys($userACL->get_granted_base());
        if ($grantedBases) {
            $orx->add($qb->expr()->in('f.baseId', $grantedBases));
        }

        if ($feedIds) {
            $qb->where($qb->expr()->in('f.id', $feedIds), $orx);
        }

        $qb->orderBy('f.updatedOn', 'DESC');

        return $qb->getQuery()->getResult();
    }
1260655
public function update($clientId, ClientBuilder $input, array $queryParams = [])
    {
        $response = $this->api->oauth2()->clients()->update($clientId, $input->toArray(), $queryParams);

        return new ClientResponse($response);
    }
1173716
private function updateRolesActions(stdClass $config, stdClass $serviceData)
    {
        $rolesActions = [
            "project-admin" =>
                [$serviceData->aclPrefix . "_list",
                    $serviceData->aclPrefix . "_create",
                    $serviceData->aclPrefix . "_update",
                    $serviceData->aclPrefix . "_delete",
                ],
        ];

        if( empty($config->acl->rolesActions) )
            $config->acl->rolesActions = $rolesActions;
        else
            $config->acl->rolesActions->{"project-admin"} = array_unique(array_merge($config->acl->rolesActions->{"project-admin"}, $rolesActions['project-admin']));

        return $config;
    }