Updating a permission or a space root permission did not check the
roles an administrator enabled with GRAPH_AVAILABLE_ROLES. An invite
with a disabled role was rejected, but the same role could be set by
updating an existing share. We now validate updates against the
allowlist, same as invites.
The three "without enabling it" scenarios now expect a 400. Their
removed lines are padded with blank lines so the line numbers of the
scenarios stay the same.
ported from `owncloud/ocis#12540`. The reva half
(`owncloud/reva#653`) is https://github.com/opencloud-eu/reva/pull/993
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
from now on, not all unified roles are enabled by default, instead the available roles are hand-picked in the default setup.
For advanced use-cases, the administrator is capable to enable the desired set of available roles.
Picking roles is not easy since the uid is NOT humanly readable, therefore a cli is contained which lists the available, disabled and enabled roles.
This is an initial implementation of PATCH support on drives/{driveid}/items/{itemid}/permissions/{id}.
It focusses on updating user shares for now. It's possible to update the
expirationDate, roles and/or libregraphResourceActions.
Updating the permissions of a space root or a public link share is currently
not implemeted.