mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
clear settings cache after changing DISABLE_LOCAL_AUTH
This commit is contained in:
@@ -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'))
|
||||||
|
|||||||
Reference in New Issue
Block a user