mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 03:17:38 -02:30
force PENDO_TRACKING_STATE to be readonly for the open source license
see: #6890
This commit is contained in:
@@ -10,6 +10,8 @@ from django.core.exceptions import ImproperlyConfigured
|
|||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from awx.conf.license import get_license
|
||||||
|
|
||||||
logger = logging.getLogger('awx.conf.registry')
|
logger = logging.getLogger('awx.conf.registry')
|
||||||
|
|
||||||
__all__ = ['settings_registry']
|
__all__ = ['settings_registry']
|
||||||
@@ -162,6 +164,11 @@ class SettingsRegistry(object):
|
|||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
logger.warning('Unable to retrieve default value for setting "%s".', setting, exc_info=True)
|
logger.warning('Unable to retrieve default value for setting "%s".', setting, exc_info=True)
|
||||||
|
|
||||||
|
# `PENDO_TRACKING_STATE` is disabled for the open source awx license
|
||||||
|
if setting == 'PENDO_TRACKING_STATE' and get_license().get('license_type') == 'open':
|
||||||
|
field_instance.read_only = True
|
||||||
|
|
||||||
return field_instance
|
return field_instance
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user