Skip to content

handle container access for folder only and container only - #941

Open
SharonStrats wants to merge 6 commits into
stagingfrom
fix/handle-multiaccess
Open

SharonStrats wants to merge 6 commits into
stagingfrom
fix/handle-multiaccess

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Improve advanced access-control editing for containers while preserving independent
folder and contents permissions.

This update makes the access-control modal better reflect the underlying ACL
authorizations and avoids destructive revoke-then-grant behavior when changing
container scopes.

Changes

  • Group access grants by subject and effective folder/contents scope.
  • Display Mixed permissions when a subject has different roles across
    authorizations instead of incorrectly merging them.
  • Preserve independently governed folder and contents permissions.
  • Use planChangeContainerAccess for existing container scope changes so
    transitions are planned atomically.
  • Preserve conditions and unrelated authorization data during scope changes.
  • Support complementary folder and contents grants for the same subject in
    Advanced sharing.
  • Validate and reject overlapping container scopes before saving.
  • Prevent conflicting duplicate grants for the same subject.
  • Warn before leaving Advanced sharing when there are unsaved changes.
  • Allow users to stay, discard changes, or keep changes when switching modes.
  • Ignore delayed target lookups after the dialog is closed, discarded, or moved
    to another resource.

SharonStrats and others added 2 commits November 30, 2026 17:14
@SharonStrats SharonStrats self-assigned this Dec 1, 2026
Copilot AI balanced review requested due to automatic review settings December 1, 2026 07:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Access-change ordering and cancelled additions can incorrectly revoke existing permissions, and an existing test still expects the previous operation order.

2 open issues
What changed in this PR

This PR extends the access-control modal to manage separate permissions for a folder and its contents.

Changes:

  • Splits combined grants into independently editable folder and contents roles and validates overlapping scopes.
  • Updates grant ordering and scope-specific revocation, with tests for the new flows.
  • Adjusts shared-access controls for smaller screens.
File Description
test/​components/​access-control-modal.test.ts Adds tests for split grants, overlap validation, and folder-only revocation.
src/​components/​access-control-modal/​buildAccessChanges.ts Reorders pending grants and scope transitions.
src/​components/​access-control-modal/​applyAccessChanges.ts Uses folder-specific revocation for removals and scope changes.
src/​components/​access-control-modal/​AccessControlSharedAccess.ts Wraps scope controls for responsive layout.
src/​components/​access-control-modal/​AccessControlSharedAccess.styles.css Adds a mobile layout for shared-access rows.
src/​components/​access-control-modal/​AccessControlModal.ts Adds grant splitting, independent row identifiers, and overlap validation.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical access-control bugs can unexpectedly revoke permissions, discard complementary grants, and mislabel the subjects affected by edits.

5 open issues
2 resolved since last review

Review effort: Balanced

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Access Control: Needs to handle a user having multiple access on a container

3 participants