Files
core/services/rbac_init.py
Untone e78e12eeee
Some checks failed
Deploy on push / deploy (push) Failing after 17s
circular-fix
2025-08-17 16:33:54 +03:00

25 lines
988 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
Модуль инициализации RBAC системы.
Настраивает dependency injection для разрешения циклических зависимостей.
Должен вызываться при старте приложения.
"""
from auth.rbac_interface import set_community_queries, set_rbac_operations
from utils.logger import root_logger as logger
def initialize_rbac() -> None:
"""
Инициализирует RBAC систему с dependency injection.
Должна быть вызвана один раз при старте приложения после импорта всех модулей.
"""
from services.rbac_impl import community_queries, rbac_operations
# Устанавливаем реализации
set_rbac_operations(rbac_operations)
set_community_queries(community_queries)
logger.info("🧿 RBAC система инициализирована с dependency injection")