Seed scoped idle_checker permissions into RBAC roles and fixtures
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Seed role permission rows for the open-string entity type "idle_checker" so scoped enable/disable can pass enforcement. Add idle_checker to the target types of scripts/generate-rbac-fixture-permissions.py and regenerate fixtures/manager/example-roles.json. Add an alembic migration seeding (scope, "idle_checker", READ|UPDATE) for admin roles and READ for member roles.
Do NOT add a legacy RBAC_ACTION_REGISTRY declaration or VALID_SCOPE_ENTITY_COMBINATIONS entry yet - that surface is advertising without enforcement (the exact #13557 review finding) and is deferred until after the scope-shape action lands (BA-7238), or dropped with the deprecating enum stack.
## Success Criteria
- [ ] regenerated example-roles.json grants admin roles UPDATE on idle_checker in their scope
- [ ] migration is idempotent: re-running adds no duplicate permission rows
- [ ] with the seed applied, the BA-7238 scope permission check passes for a project admin
- [ ] pants test passes for affected packages
JIRA Issue: BA-7240
Contributor guide
Research direction
Start with scripts/generate-rbac-fixture-permissions.py and the existing fixtures/manager/example-roles.json to understand target types and generated permissions. Review existing Alembic migrations that seed RBAC role permissions, then add the idle_checker rows with idempotent behavior. Regenerate the fixture and run pants test for the affected packages; done means the listed success criteria pass without adding the deferred registry or scope-combination entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization, backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100