Skip to content

List unheld new permissions and complete the permission-split report - #4467

Merged
craig-dt merged 3 commits into
mainfrom
cursor/factory-4433-the-roles-screen-doesn-t-list-new-permissions-no-custom-role-holds-or-mark-no-effect-d9e6
Nov 16, 2026
Merged

craig-dt merged 3 commits into
mainfrom
cursor/factory-4433-the-roles-screen-doesn-t-list-new-permissions-no-custom-role-holds-or-mark-no-effect-d9e6

Conversation

@craig-dt

@craig-dt craig-dt commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #4433

The roles screen never said which new-capability permissions no custom role holds, and it drew person-only permissions as ordinary checkboxes. The permission-split upgrade report also never said whether anyone could still manage roles, or that approving through chat or a person's MCP token no longer approves.

GET /api/users/roles/list now returns new_permissions_unheld (catalog permissions whose origin is a new capability, held by no custom or legacy role) and person_only (the same PERSON_ONLY set the permission check uses). The roles card lists the unheld names when there are any, and a granted person-only permission is marked "no effect for a service account". The service account edit hint is unchanged. directory.sync is a new capability too, and no custom role may hold it, so it is left off that list.

0008_permission_catalog still writes the same grants. Its report, after those grants, counts active non-deleted people whose role holds roles.manage. When that count is zero the report says "Nobody on this install can manage roles" and names python -m core.auth.recover_admin; otherwise it says someone can. Beside the Senior Analyst widening it states that approving an outside action through chat or a person's MCP token no longer approves it. The line is in the command output, the history reports entry, and the roles.revised trail entry.

Verification

Ran

  • Two databases migrated to 0007_conversation_generation (the revision immediately before the permission split; that revision is on the v0.9.0 chain). One had only the legacy admin role held by an active person, plus an inactive person, a deleted person, and a service account on built-in Admin. python -m core.upgrade from this branch wrote a 0008_permission_catalog report whose command output, history.jsonl entry, and roles.revised trail row say "Nobody on this install can manage roles", name python -m core.auth.recover_admin, and state the chat and MCP approval exception. Legacy admin did not gain roles.manage.
  • The same seed plus an active person on role-admin. The report says "Someone can manage roles." and still states the exception.
  • The same two seeds upgraded with the parent commit. Every role's permissions match this branch. The parent report has neither line.
  • Console, signed in through the first-account screen, Settings → System → Team & access. A custom role started from the Auditor preset. The screen and GET /api/users/roles/list listed cases.move, roles.manage, sessions.manage, and teams.manage. Granting teams.manage removed it and left the other three. Built-in roles holding all four did not empty the list. The built-in Admin dialog marks only audit.forward and audit.manage "no effect for a service account". The Auditor role, which does not hold them, shows no marker. A service account on Admin still shows "audit.forward, audit.manage: stored on the role, no effect for a service account."
  • That screen at 1920×1080 and at 360×800. At 360 the permission list was wider than the dialog, so it now uses one column until 220px fits twice; the new-permissions banner keeps its icon on the first line. After that, the dialog and the banner do not scroll sideways. The roles table still scrolls inside its own card, which is how the other settings tables behave. The issue has no screen image to compare.
  • Pre-commit on the feature commits and on the merge with main: black, isort, flake8, and frontend API type regeneration.

Did not run

  • The repository CI workflows. They run on the pull request.
  • A second upgrade of a database already at v0.9.0's head (0016_retention). That head is past 0008, so the revision does not run again and cannot reprint these lines. Installs that still have 0008 pending, including adoption from 0.7.0 and 0.8.0, are the ones that get the report.
  • The console again after merging main. The conflict was the changelog, the permission-row class, and leaving directory.sync off the unheld list.

Blocked by the machine

none

Open in Web Open in Cursor 

cursoragent and others added 2 commits November 16, 2026 05:06
The roles list names new-capability permissions no custom or legacy role
holds, and the person-only keys, so the roles screen can list that gap and
mark audit.forward and audit.manage. The 0008 report states whether any
active person can manage roles afterwards, and that approving through chat
or a person's MCP token no longer approves.

Co-authored-by: craig-dt <craig@deeptempo.ai>
The permission list drops to one column when the dialog is narrow, and the
new-permissions banner keeps its icon on the first line.

Co-authored-by: craig-dt <craig@deeptempo.ai>
@craig-dt

Copy link
Copy Markdown
Collaborator Author

🏭 Handed the merge conflicts back to the agent that opened this (1 of 3): merge conflicts with main.

directory.sync is a new capability no custom role may hold, so the roles
banner does not list it as a gap. Both changelog notes stay, and the role
dialog keeps the narrow-width layout alongside the not-grantable tag.

Co-authored-by: craig-dt <craig@deeptempo.ai>
@craig-dt
craig-dt merged commit 9bd491b into main Nov 16, 2026
21 checks passed
@craig-dt
craig-dt deleted the cursor/factory-4433-the-roles-screen-doesn-t-list-new-permissions-no-custom-role-holds-or-mark-no-effect-d9e6 branch November 16, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory Opened by the software factory

Projects

None yet

2 participants