Repository navigation
fix(datasets): follow semantic view modification permissions - #46448
Open
mikebridge wants to merge 3 commits into
Open
mikebridge wants to merge 3 commits into
mikebridge wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #46448 +/- ##
=======================================
Coverage 85.92% 85.93%
=======================================
Files 3122 3122
Lines 216903 216949 +46
Branches 51423 51433 +10
=======================================
+ Hits 186380 186428 +48
+ Misses 27106 27103 -3
- Partials 3417 3418 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mikebridge
marked this pull request as ready for review
November 22, 2026 04:03
mikebridge
requested review from
geido,
michael-s-molina,
msyavuz,
rusackas,
sadpandajoe and
villebro
as code owners
November 22, 2026 04:03
mikebridge
requested review from
aminghadersohi,
fitzee,
gabotorresruiz and
rebenitez1802
November 22, 2026 04:04
Contributor
aminghadersohi
approved these changes
Nov 22, 2026
aminghadersohi
left a comment
Contributor
There was a problem hiding this comment.
can_modify matches the SemanticView PUT/DELETE/bulk-delete checks and the list gates follow it.
Nit: In deletePermissionError, a SemanticView-only writer bulk-deleting an ordinary dataset is told to become a dataset editor, not that Dataset write is missing.
This branch has not been deployed
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.
SUMMARY
Make semantic-view Edit, Delete and bulk-delete controls follow the server's modification rule. A creator or resolver-granted editor can use the actions when they also have SemanticView write permission and access to the view. The combined datasource list supplies a boolean instead of exposing creator/editor identities or reconstructing the rule in the browser.
Selections containing a semantic view the user cannot modify are refused before confirmation or destructive requests. Selection and export remain available. Ordinary dataset behavior is unchanged for Dataset writers; a user with only SemanticView write cannot use the newly available bulk controls to delete ordinary datasets. Commands still recheck permissions and deletion dependencies; the flag is not an authorization token.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: semantic-view actions used an admin-only UI approximation and misleading tooltips. After: row actions and bulk eligibility use the server result, with a permission message for denied views. No browser check was run; no screenshots are claimed.
TESTING INSTRUCTIONS
Automated checks: 276 focused Python tests, 182 DatasetList Jest tests across eight suites, frontend TypeScript, changed-file hooks and POT drift check passed. With real database roles and permission lookups, a non-admin writer with all-datasource access takes 11 statements for both one and 25 semantic views, versus 8 and 32 on the base. The SQLite fixture has distinct creators/layers, a cold identity map and preloaded login role/group relationships. Repeated permission checks are memoized only during serialization; distinct per-view grants still need their first lookup, and a custom extra-editor resolver still runs per eligible row with its own cost. No universal production query bound is claimed.
To check manually with semantic layers enabled, compare an admin, a view creator, a resolver-granted editor and an unrelated writer. Verify Edit/Delete and bulk-delete permission messages follow SemanticView write permission and view access. Include a denied view in a mixed selection: no confirmation or delete request should occur. Verify ordinary dataset actions/export remain unchanged and server dependency refusals still appear for eligible views.
ADDITIONAL INFORMATION
can_modifyboolean on semantic rows in the combined datasource response