Repository navigation
fix(frontend): allow administrators to edit shared dashboards - #149
Merged
Merged
Conversation
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.
Description
Administrators could delete another user's dashboard but could not edit its tiles, rename it, or add SQL charts to it. The frontend checked ownership alone even though the backend supports administrator edits.
Allow dashboard owners and administrators to use these editing flows consistently, including the fresh-document permission check before adding a SQL chart. Wait for role lookup before showing a read-only notice, while preserving owner editing when role lookup fails. Favourites and the Mine filter retain their ownership rules.
This PR is based on current main, which already authorizes administrator writes and preserves the original owner and storage path. No backend changes or ownership transfers are needed.
Validation
ERR_NETWORK_CHANGEDstartup failures passed on a focused rerun (4/4 including related admin cases).git diff --checkpassed.Regressions cover direct, superadmin and group admin roles; Percent fill edit/save/reload; list rename; repaired tile IDs; delayed/failed role lookups; SQL chart append; and unchanged owner/tenant fields. Non-admin non-owners remain read-only.
Review
Opus 5.5 approved the patch. Sol 6.1 agreed with the implementation and requested one read-only fixture correction; that correction is included and all nine tests in its file pass.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.