Repository navigation
Support staff see support projects in every list across projects (OFN-4816) - #5301
Merged
Merged
Conversation
…-4816) visible_project_ids/1 gives a support user their member projects plus every project with allow_support_access, sandboxes included, as Scope lets them open each. Every list across projects reads it, so the projects list (v2 and v3) and the workflows, jobs, runs, work orders and log lines lists all widen for support users, matching the dashboard. /api/v3/me/memberships lists one membership in each project the projects list gives. A project reached by support access alone answers with role support and the project's id as its id, since there is no project_users row; abilities come from the policy as before. A row wins over support access.
Security Review ✅
|
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.
A support user could open any project with
allow_support_access, but the API listed only the projects they were a member of, so the new front end couldn't find a support project except by its id.Projects.visible_project_ids/1now gives a support user every project withallow_support_access, sandboxes included, asScopelets them open each. Every list across projects reads it:GET /api/projectsand/api/v3/projects(live, top-level ones), and the workflows, jobs, runs, work orders and log lines lists. v2 changes too; that's deliberate and matches the dashboard.GET /api/v3/me/membershipslists one membership per project in the projects list. A project reached by support access alone answers withrole: "support", the project's id asid, and abilities from the policy (can_edit_workflowsandcan_runtrue today). A membership row wins over support access.supportis added only to the/me/membershipsrole enum; theinclude=membersrole is unchanged.Client side: OpenFn/lightning-ui#166 (
MyRole).Not done