mirror of
https://github.com/ansible/awx.git
synced 2026-04-27 20:55:23 -02:30
Merge pull request #408 from chrismeyersfsu/7500_process_workflow_cornercase_for_user_capability
memoize workflow license feature check
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user