Skip to content

Hide the 'Archive Vault' button for admin users without ownership rights, or allow admins to actually do this #283

@SailReal

Description

@SailReal

Please agree to the following

Summary

In the vault details, hide "Archive Vault" button for admin users without ownershop rights

System Setup

- Hub: 1.3.4
- Keycloak: x
- Cryptomator (Desktop/Android/iOS): y

Steps to Reproduce

  1. Create user foo
  2. Give foo admin privileges
  3. Open in Hub vault bar which you can unlock but don't have ownership permission

Expected Behavior

  • Either no ‘Archive Vault’ is displayed
  • Or an admin can actually archive (and unarchive) the vault which is currently blocked by the backend

Actual Behavior

image

Reproducibility

Always

Relevant Log Output

No response

Anything else?

@PUT
@Path("/{vaultId}")
@RolesAllowed("user")
@VaultRole(value = VaultAccess.Role.OWNER, onMissingVault = VaultRole.OnMissingVault.PASS)
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Transactional
@Operation(summary = "creates or updates a vault",
description = "Creates or updates a vault with the given vault id. The creationTime in the vaultDto is always ignored. On creation, the current server time is used and the archived field is ignored. On update, only the name, description, and archived fields are considered.")
@APIResponse(responseCode = "200", description = "existing vault updated")
@APIResponse(responseCode = "201", description = "new vault created")
@APIResponse(responseCode = "402", description = "number of licensed seats is exceeded")
public Response createOrUpdate(@PathParam("vaultId") UUID vaultId, @Valid @NotNull VaultDto vaultDto) {

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions