File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33"""
44
55from django .apps import AppConfig
6+ from django .conf import settings
67
78from openedx_authz .engine .enforcer import AuthzEnforcer
89
@@ -45,4 +46,7 @@ class OpenedxAuthzConfig(AppConfig):
4546 def ready (self ):
4647 """Initialization layer for the openedx_authz app."""
4748 # Initialize the enforcer to ensure it's ready when the app starts
49+ casbin_adapter_app = "casbin_adapter.apps.CasbinAdapterConfig"
50+ if casbin_adapter_app not in settings .INSTALLED_APPS :
51+ settings .INSTALLED_APPS .append (casbin_adapter_app )
4852 AuthzEnforcer ()
Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ def plugin_settings(settings):
1717 settings: The Django settings object
1818 """
1919 # Add external third-party apps to INSTALLED_APPS
20- casbin_adapter_app = "casbin_adapter.apps.CasbinAdapterConfig"
21- if casbin_adapter_app not in settings .INSTALLED_APPS :
22- settings .INSTALLED_APPS .append (casbin_adapter_app )
2320
2421 # Add Casbin configuration
2522 settings .CASBIN_MODEL = os .path .join (
You can’t perform that action at this time.
0 commit comments