Repository navigation
feat(policy): add the analyst role below member - #2543
Conversation
Observer is a read-only org role for people who follow the product without operating it. It ranks below member, so every permission in the table already excludes it. A role string this code does not know now reads as observer, the least a session can hold, where it read as member. A tenant with no roles still reads as member: only Maple's own agents arrive without one. Nothing assigns the role yet, and the Members page does not offer it.
This comment has been minimized.
This comment has been minimized.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The role also builds dashboards, so observer undersold it. Key org:analyst.
Maple review🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open. Adds an
Before merge
Still open from earlier reviews
|
|
Merged with 1 step from "Before merge" still open. If it is done, tick it on the review comment; if not, now is the time.
|
First layer of the Analyst role: an org role for people who follow the product and build dashboards without operating it (product, support, finance, founders).
What changed
analystjoins the role ladder belowmember, with the keyorg:analyst.Nothing assigns the role yet and the Members page does not offer it, so this layer changes no behaviour for existing sessions. One edge: a membership moved to a role key the code does not know now retires that person's member-pinned credentials, where it kept them before.
The role started out as a read-only "Observer". It was renamed and given dashboards before anything merged, so the branch names still say
observer/.Verified
packages/domain:vitest run src/policy/policy.test.ts, 16 passed. Cases: an analyst holds no named grants, stays an analyst next to an unknown role, takes the higher of two roles, and a member-pinned credential outranks an analyst.@maple/domaintypecheck and the CI lint config onpackages/domain/src/policy: clean.Next layers
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit