feat(site): add template access warnings to workspace sharing#25368
Draft
tracyjohnsonux wants to merge 1 commit into
Draft
feat(site): add template access warnings to workspace sharing#25368tracyjohnsonux wants to merge 1 commit into
tracyjohnsonux wants to merge 1 commit into
Conversation
When adding users or groups to workspace sharing, the UI now warns if members may not have access to the workspace's template. This helps prevent the confusing situation where a user is shared on a workspace but cannot see it because they lack template access. The frontend fetches the template ACL and cross-references it with the workspace ACL. A warning icon appears next to each member without template access, and a summary alert is shown above the member list. If the template ACL query fails (e.g. insufficient permissions), no warnings are shown to avoid false positives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When adding users or groups to workspace sharing, the UI now warns if members may not have access to the workspace's template. This prevents the confusing situation where a user is shared on a workspace but cannot see it because they lack template access.
The frontend fetches the template ACL via
templateACL(workspace.template_id)and cross-references it with the workspace ACL members. A warning icon with tooltip appears next to each member who may lack template access, and a summary alert is shown above the member list when any warnings exist.If the template ACL query fails (e.g. insufficient permissions), no warnings are shown to avoid false positives.
Relates to #25338
Implementation details
Changes
useWorkspaceSharing.ts: AddedtemplateACLquery withretry: falseto gracefully handle permission errorsWorkspaceSharingForm.tsx: AddedtemplateACLprop,hasTemplateAccess()helper,NoTemplateAccessIconcomponent with tooltip, summaryAlert, and per-row warning iconsShareButton.tsx,WorkspaceSharingPage.tsx,WorkspaceSharingPageView.tsx: PasstemplateACLthrough toWorkspaceSharingFormWorkspaceSharingForm.stories.tsx: New Storybook stories for all warning statesAccess check logic