Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
SailReal opened this issue Jun 4, 2024 · 0 comments
Labels
type:bug Something isn't working

Comments

@SailReal
Copy link
Member

SailReal commented Jun 4, 2024

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) {

@SailReal SailReal added the type:bug Something isn't working label Jun 4, 2024
@SailReal SailReal changed the title Hide "Archive Vault" button for admin users without ownershop rights Hide the 'Archive Vault' button for admin users without Ownershop rights, or allow admins to actually do this Jun 7, 2024
@SailReal SailReal changed the title Hide the 'Archive Vault' button for admin users without Ownershop rights, or allow admins to actually do this Hide the 'Archive Vault' button for admin users without ownership rights, or allow admins to actually do this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant