From b875c03f4ad71ec93a403b1b4f2a10dd024da310 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 17 Mar 2020 17:19:33 -0400 Subject: [PATCH] Clean up a few more cases where we checked the license for features. --- awx/main/access.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/awx/main/access.py b/awx/main/access.py index d4c830f108..c1afd5c803 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -789,7 +789,6 @@ class OrganizationAccess(NotificationAttachMixin, BaseAccess): return self.user in obj.admin_role def can_delete(self, obj): - self.check_license(check_expiration=False) is_change_possible = self.can_change(obj, None) if not is_change_possible: return False @@ -1440,9 +1439,6 @@ class JobTemplateAccess(NotificationAttachMixin, BaseAccess): # if reference_obj is provided, determine if it can be copied reference_obj = data.get('reference_obj', None) - if 'survey_enabled' in data and data['survey_enabled']: - self.check_license(feature='surveys') - if self.user.is_superuser: return True @@ -1514,9 +1510,6 @@ class JobTemplateAccess(NotificationAttachMixin, BaseAccess): data = dict(data) - if 'survey_enabled' in data and obj.survey_enabled != data['survey_enabled'] and data['survey_enabled']: - self.check_license(feature='surveys') - if self.changes_are_non_sensitive(obj, data): return True @@ -1951,10 +1944,6 @@ class WorkflowJobTemplateAccess(NotificationAttachMixin, BaseAccess): if not data: # So the browseable API will work return Organization.accessible_objects(self.user, 'workflow_admin_role').exists() - # will check this if surveys are added to WFJT - if 'survey_enabled' in data and data['survey_enabled']: - self.check_license(feature='surveys') - return ( self.check_related('organization', Organization, data, role_field='workflow_admin_role', mandatory=True) and self.check_related('inventory', Inventory, data, role_field='use_role')