Merge pull request #408 from chrismeyersfsu/7500_process_workflow_cornercase_for_user_capability

memoize workflow license feature check
This commit is contained in:
Chris Meyers
2017-09-14 08:29:41 -04:00
committed by GitHub
4 changed files with 16 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ from django.utils.translation import ugettext_lazy as _
from rest_framework.exceptions import APIException
# Tower
from awx.main.utils.common import get_licenser
from awx.main.utils.common import get_licenser, memoize
__all__ = ['LicenseForbids', 'get_license', 'get_licensed_features',
'feature_enabled', 'feature_exists']
@@ -40,6 +40,7 @@ def get_licensed_features():
return features
@memoize(cache_name='ephemeral')
def feature_enabled(name):
"""Return True if the requested feature is enabled, False otherwise."""
validated_license_data = _get_validated_license_data()