lablup / lablup/backend.ai

Update REST API and DTO layer for new unified RBAC enum

Open
#9,145 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

Replace ScopeType/EntityType references with RBACElementType in the REST API and DTO layer:

- api/rbac/scope_adapter.py: Change scope_type parameter to RBACElementType, handle GLOBAL specially (not in RBACElementType)

- api/rbac/entity_adapter.py: Change scope_type/entity_type parameters to RBACElementType, use bridge methods for downstream code

- api/rbac/handler.py: Follows DTO changes automatically

- api/vfolder.py: Direct replacement (ScopeType.PROJECT → RBACElementType.PROJECT, etc.)

- common/dto/manager/rbac/path.py: Change SearchScopesPathParam.scope_type and SearchEntitiesPathParam fields to RBACElementType

- common/dto/manager/rbac/response.py, request.py: Update DTO field types

GLOBAL handling: ScopeType.GLOBAL has no RBACElementType equivalent. scope_adapter.py's GLOBAL branch and SearchScopesPathParam need special handling (Optional or separate flag).

~6 files.

Depends on: BA-4522, BA-4611

JIRA Issue: BA-4612

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.