feat: add tenant-scoped rule and permission management
This commit is contained in:
@@ -8,6 +8,7 @@ from fastapi_modules.fastapi_leaudit.domian.Dto.rbacAdminDto import (
|
||||
RolePermissionsBatchDTO,
|
||||
RoleRoutesUpdateDTO,
|
||||
RoleUpdateDTO,
|
||||
UserTenantUpdateDTO,
|
||||
)
|
||||
from fastapi_modules.fastapi_leaudit.domian.vo.rbacAdminVo import (
|
||||
OrganizationTreeVO,
|
||||
@@ -21,6 +22,7 @@ from fastapi_modules.fastapi_leaudit.domian.vo.rbacAdminVo import (
|
||||
RouteVO,
|
||||
UserListVO,
|
||||
UserRolesVO,
|
||||
UserTenantUpdateVO,
|
||||
)
|
||||
|
||||
|
||||
@@ -48,7 +50,15 @@ class IRbacAdminService(ABC):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def ListUsers(self, CurrentUserId: int, Page: int, PageSize: int, Area: str | None, NickName: str | None) -> UserListVO:
|
||||
async def ListUsers(
|
||||
self,
|
||||
CurrentUserId: int,
|
||||
Page: int,
|
||||
PageSize: int,
|
||||
Area: str | None,
|
||||
TenantCode: str | None,
|
||||
NickName: str | None,
|
||||
) -> UserListVO:
|
||||
"""查询用户列表。"""
|
||||
...
|
||||
|
||||
@@ -58,7 +68,16 @@ class IRbacAdminService(ABC):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def ListRoleUsers(self, CurrentUserId: int, RoleId: int, Page: int, PageSize: int, Area: str | None, UserName: str | None) -> UserListVO:
|
||||
async def ListRoleUsers(
|
||||
self,
|
||||
CurrentUserId: int,
|
||||
RoleId: int,
|
||||
Page: int,
|
||||
PageSize: int,
|
||||
Area: str | None,
|
||||
TenantCode: str | None,
|
||||
UserName: str | None,
|
||||
) -> UserListVO:
|
||||
"""查询指定角色下的用户列表。"""
|
||||
...
|
||||
|
||||
@@ -67,6 +86,11 @@ class IRbacAdminService(ABC):
|
||||
"""为用户分配角色。"""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def UpdateUserTenant(self, CurrentUserId: int, UserId: int, Body: UserTenantUpdateDTO) -> UserTenantUpdateVO:
|
||||
"""更新用户租户。"""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def RevokeUserRole(self, CurrentUserId: int, UserId: int, RoleId: int) -> None:
|
||||
"""移除用户角色。"""
|
||||
|
||||
Reference in New Issue
Block a user