Files
core/rbac/__init__.py
Untone 9a2b792f08
Some checks failed
Deploy on push / deploy (push) Failing after 6s
refactored
2025-08-17 17:56:31 +03:00

18 lines
704 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.
from 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 rbac.operations import community_queries, rbac_operations
# Устанавливаем реализации
set_rbac_operations(rbac_operations)
set_community_queries(community_queries)
logger.info("🧿 RBAC система инициализирована с dependency injection")