Merge pull request #13653 from TheRealHaoLiu/fix-enable_local_authentication

Fix enable local authentication
This commit is contained in:
Hao Liu
2023-03-06 14:37:21 -05:00
committed by GitHub

View File

@@ -1,5 +1,6 @@
from django.core.management.base import BaseCommand, CommandError from awx.main.tasks.system import clear_setting_cache
from django.conf import settings from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand): class Command(BaseCommand):
@@ -31,5 +32,7 @@ class Command(BaseCommand):
else: else:
raise CommandError('Please pass --enable flag to allow local auth or --disable flag to disable local auth') raise CommandError('Please pass --enable flag to allow local auth or --disable flag to disable local auth')
clear_setting_cache.delay(['DISABLE_LOCAL_AUTH'])
def handle(self, **options): def handle(self, **options):
self._enable_disable_auth(options.get('enable'), options.get('disable')) self._enable_disable_auth(options.get('enable'), options.get('disable'))