跳到主要内容

setAccessToWebItems

SecurityArrayWrapper setAccessToWebItems(WebItemsSecurityRequestDto)

PUT /api/2.0/settings/security/access

Set access to modules in bulk

Switches several portal modules on or off in one call: items carries an entry per module, its key the module GUID and its value the new enabled flag. The caller needs the portal-settings right of a DocSpace administrator, and the call is answered with 403 on an open portal, where everyone is admitted and per-module rules would mean nothing. Every key has to be a GUID; anything else is rejected as an invalid request, and a module listed twice is applied once, from its first entry. This operation carries no subject list of its own: switching a product module on restores the users and groups it was last restricted to, while every other case is stored as a plain allow or deny for everyone, so use PUT api/2.0/settings/security when the allow-list itself has to change. The batch is recorded in the audit trail as one list update rather than module by module. The answer is the resulting configuration of every module listed, in the shape GET api/2.0/settings/security returns.

Parameters​

NameInTypeDescriptionNotes
WebItemsSecurityRequestDtobodyWebItemsSecurityRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The resulting access configuration of every module listed in the requestSecurityArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, or a key in items is not a GUID--
403Per-module access cannot be configured on an open portal, or the caller lacks the portal-settings right of a DocSpace administrator--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

SecurityArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json