mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 01:45:56 -05:00
[PR #5386] [MERGED] Add manage role for collections and groups #7252
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/5386
Author: @BlackDex
Created: 1/12/2025
Status: ✅ Merged
Merged: 1/21/2025
Merged by: @dani-garcia
Base:
main← Head:add-manage-role📝 Commits (2)
07e4813Add manage role for collections and groupscc09bb7Fix an issue with access_all📊 Changes
16 files changed (+184 additions, -70 deletions)
View changed files
➕
migrations/mysql/2025-01-09-172300_add_manage/down.sql(+0 -0)➕
migrations/mysql/2025-01-09-172300_add_manage/up.sql(+5 -0)➕
migrations/postgresql/2025-01-09-172300_add_manage/down.sql(+0 -0)➕
migrations/postgresql/2025-01-09-172300_add_manage/up.sql(+5 -0)➕
migrations/sqlite/2025-01-09-172300_add_manage/down.sql(+0 -0)➕
migrations/sqlite/2025-01-09-172300_add_manage/up.sql(+5 -0)📝
src/api/core/organizations.rs(+32 -20)📝
src/api/icons.rs(+1 -3)📝
src/api/notifications.rs(+0 -2)📝
src/db/models/cipher.rs(+30 -20)📝
src/db/models/collection.rs(+75 -15)📝
src/db/models/group.rs(+16 -3)📝
src/db/models/organization.rs(+9 -7)📝
src/db/schemas/mysql/schema.rs(+2 -0)📝
src/db/schemas/postgresql/schema.rs(+2 -0)📝
src/db/schemas/sqlite/schema.rs(+2 -0)📄 Description
This commit will add the manage role/column to collections and groups. We need this to allow users part of a collection either directly or via groups to be able to delete ciphers. Without this, they are only able to either edit or view them when using new clients, since these check the manage role.
Still trying to keep it compatible with previous versions and able to revert to an older Vaultwarden version and the
access_allfeature of the older installations. In a future version we should really check and fix these rights and create some kind of migration step to also remove theaccess_allfeature and convert that to amanageoption. But this commit at least creates the base for this already.This should resolve #5367
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.