diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 4bafcbea24..31d8bb2fe4 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -323,7 +323,12 @@ FEATURES.update({ 'AUTOMATIC_AUTH_FOR_TESTING': True, 'ENABLE_DISCUSSION_SERVICE': True, 'SHOW_HEADER_LANGUAGE_SELECTOR': True, - 'ENABLE_ENTERPRISE_INTEGRATION': False, + + # Enable enterprise integration by default. + # See https://github.com/edx/edx-enterprise/blob/master/docs/development.rst for + # more background on edx-enterprise. + # Toggle this off if you don't want anything to do with enterprise in devstack. + 'ENABLE_ENTERPRISE_INTEGRATION': True, }) ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', False) @@ -362,14 +367,15 @@ CREDENTIALS_SERVICE_USERNAME = 'credentials_worker' COURSE_CATALOG_URL_ROOT = 'http://edx.devstack.discovery:18381' COURSE_CATALOG_API_URL = '{}/api/v1'.format(COURSE_CATALOG_URL_ROOT) -# Enable enterprise integration so that we can include enterprise System-wide -# role logic without having to manipulate private settings. -FEATURES['ENABLE_ENTERPRISE_INTEGRATION'] = True SYSTEM_WIDE_ROLE_CLASSES = os.environ.get("SYSTEM_WIDE_ROLE_CLASSES", SYSTEM_WIDE_ROLE_CLASSES) -SYSTEM_WIDE_ROLE_CLASSES.extend([ +SYSTEM_WIDE_ROLE_CLASSES.append( 'system_wide_roles.SystemWideRoleAssignment', - 'enterprise.SystemWideEnterpriseUserRoleAssignment', -]) +) + +if FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION'): + SYSTEM_WIDE_ROLE_CLASSES.append( + 'enterprise.SystemWideEnterpriseUserRoleAssignment', + ) # List of enterprise customer uuids to exclude from transition to use of enterprise-catalog ENTERPRISE_CUSTOMERS_EXCLUDED_FROM_CATALOG = ()