Browse Source
Brings the branch up to date with upstream main (pull/7397/head5040bcb7,a6a88e79,46ae59ea). Conflict resolutions, all in src/api/core/organizations.rs: * post_bulk_access_collections: kept this branch's up-front validation of the whole request (groups, users and collections are checked before any assignment is deleted), using upstream's single-query group check. * send_invite / edit_member: kept this branch's permission gating around group assignment. Upstream's new "group belongs to this organization" check is already covered here - by InviteData::validate for the invite path and by the explicit pre-validation loop for edit_member. * post_org_import: took upstream's rewrite, which authorizes pre-existing collections with Collection::is_writable_by_user instead of can_access_collection. This closes an issue a security review of this branch reported as F8: can_access_collection is satisfied by a read-only assignment, so a member with import permission and read-only access to a shared collection could plant ciphers in it. This branch's relationship-index pre-validation is kept on top. * get_groups_data: adopted upstream's authorization gate. The plain group list now needs full organization access or a manageable collection; the details view needs full access. Extended for the custom-role model: the 'Manage Users'/'Manage Groups' permissions also satisfy the check, since they are what the route guards require for the details view and a member holding them may reach no collection of their own. To make the membership available to that check, the permission-guard macro in auth.rs now carries the caller's Membership record. Verified: cargo check, cargo clippy --features sqlite (both clean), cargo test --features sqlite (47 passed), cargo fmt --all -- --check.
37 changed files with 875 additions and 576 deletions
File diff suppressed because it is too large
@ -1,4 +1,4 @@ |
|||
[toolchain] |
|||
channel = "1.96.1" |
|||
channel = "1.97.1" |
|||
components = [ "rustfmt", "clippy" ] |
|||
profile = "minimal" |
|||
|
|||
Loading…
Reference in new issue