This commit is contained in:
@@ -40,6 +40,18 @@ class RBACOperations(Protocol):
|
||||
"""Проверяет, есть ли у набора ролей конкретное разрешение в сообществе"""
|
||||
...
|
||||
|
||||
def assign_role_to_user(self, author_id: int, role: str, community_id: int, session: Any = None) -> bool:
|
||||
"""Назначает роль пользователю в сообществе"""
|
||||
...
|
||||
|
||||
def get_user_roles_in_community(self, author_id: int, community_id: int, session: Any = None) -> list[str]:
|
||||
"""Получает роли пользователя в сообществе"""
|
||||
...
|
||||
|
||||
def remove_role_from_user(self, author_id: int, role: str, community_id: int, session: Any = None) -> bool:
|
||||
"""Удаляет роль у пользователя в сообществе"""
|
||||
...
|
||||
|
||||
|
||||
class CommunityAuthorQueries(Protocol):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user