feat(role): add role_code across schema and APIs
This commit is contained in:
@@ -3,7 +3,7 @@ from app.schemas.permissions import RoleSnapshotItem, RoleSnapshotResponse
|
||||
|
||||
class PermissionService:
|
||||
@staticmethod
|
||||
def build_role_snapshot(user_sub: str, rows: list[tuple[str, str, str, str, str, str, str, str]]) -> RoleSnapshotResponse:
|
||||
def build_role_snapshot(user_sub: str, rows: list[tuple[str, str, str, str, str, str, str, str, str]]) -> RoleSnapshotResponse:
|
||||
return RoleSnapshotResponse(
|
||||
user_sub=user_sub,
|
||||
roles=[
|
||||
@@ -15,6 +15,7 @@ class PermissionService:
|
||||
system_key=system_key,
|
||||
system_name=system_name,
|
||||
role_key=role_key,
|
||||
role_code=role_code,
|
||||
role_name=role_name,
|
||||
)
|
||||
for (
|
||||
@@ -25,6 +26,7 @@ class PermissionService:
|
||||
system_key,
|
||||
system_name,
|
||||
role_key,
|
||||
role_code,
|
||||
role_name,
|
||||
) in rows
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user