mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[PR #2667] [CLOSED] Group support #3127
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#3127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/2667
Author: @MFijak
Created: 8/2/2022
Status: ❌ Closed
Base:
main← Head:group_support📝 Commits (10+)
ab6f3c7migration scripts added891f4c8enable UI group support68cfd90schema added5a53041Db CRUD operations and API endpoints implementedad7e6bfload assigned group collections for user073daebrevision update implemented82091bdfixes for mysql, sqlite064a1e3cipher readonly, hide_passwords39d078ause cipher sync data if possible827bf4cfix for group collections📊 Changes
17 files changed (+1188 additions, -19 deletions)
View changed files
➕
migrations/mysql/2022-07-27-110000_add_group_support/down.sql(+3 -0)➕
migrations/mysql/2022-07-27-110000_add_group_support/up.sql(+23 -0)➕
migrations/postgresql/2022-07-27-110000_add_group_support/down.sql(+3 -0)➕
migrations/postgresql/2022-07-27-110000_add_group_support/up.sql(+23 -0)➕
migrations/sqlite/2022-07-27-110000_add_group_support/down.sql(+3 -0)➕
migrations/sqlite/2022-07-27-110000_add_group_support/up.sql(+23 -0)📝
src/api/core/ciphers.rs(+14 -0)📝
src/api/core/organizations.rs(+370 -3)📝
src/api/mod.rs(+1 -0)📝
src/db/models/cipher.rs(+88 -11)📝
src/db/models/collection.rs(+22 -2)➕
src/db/models/group.rs(+501 -0)📝
src/db/models/mod.rs(+2 -0)📝
src/db/models/organization.rs(+4 -3)📝
src/db/schemas/mysql/schema.rs(+36 -0)📝
src/db/schemas/postgresql/schema.rs(+36 -0)📝
src/db/schemas/sqlite/schema.rs(+36 -0)📄 Description
Hello all,
This is my first ever pull request and I also never used Rust before. Please tell me if I did anything wrong.
I implemented the group support, which is related to issue #1623.
To test my changes following sites can be used:
There was one code segment I was not so sure about if my implementation is the correct approach:
pub async fn find_by_user_uuid(user_uuid: &str, conn: &DbConn)Db/models/collection.rs
This function basically returns all collections which the user has access to. I squeezed my group implementation into the query builder. Maybe a better approach would be to fire two independent queries. Each for user collections and group collections. I think this would be the better approach, because you can much clearer see what the query does. But I would assume there comes a small performance penalty.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.