lablup / lablup/backend.ai

Remove IDLE_CHECKER_ASSIGNMENT RBAC type and restrict assignment deletion to superadmin

Open
#13,546 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
15h 13m
Merged PRs (30d)
368

Description

Remove IDLE_CHECKER_ASSIGNMENT from EntityType/ScopeType/RBACElementType, the RBACElementTypeDTO mirror, the PermissionGQL.scope() match, and related tests. Change REST DELETE /idle-checker-assignments/{id} from auth_required to superadmin_required and add check_admin_only() to the GQL purge_idle_checker_assignment resolver. Keep the purge action scope-shaped but swap the RBAC validator for a superadmin validator, so audit keeps both the entity ref and the scope ref (a global-shape action would drop them).

## Success Criteria
- [ ] no IDLE_CHECKER_ASSIGNMENT references remain outside CHANGELOG and migrations
- [ ] non-superadmin with scope UPDATE: delete assignment returns 403; superadmin succeeds
- [ ] audit row for delete: operation DELETE, entity idle_checker:C1, scope ref intact
- [ ] component permission tests (test_scoped_search_permissions.py and friends) updated and passing
- [ ] pants test passes for affected packages

JIRA Issue: BA-7241

Contributor guide

Open the contributing guide

Research direction

Locate the EntityType, ScopeType, RBACElementType, RBACElementTypeDTO, PermissionGQL.scope(), REST delete endpoint, and purge_idle_checker_assignment resolver named in the issue. Review the related component permission tests, including test_scoped_search_permissions.py, before changing authorization behavior. Done means the references and tests are updated, deletion is superadmin-only with an intact scope audit reference, and pants test passes for affected packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, python
Domain
api, authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.