From 1bd8bd245b96f5789a2c718a43550043af997af2 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 28 Oct 2016 11:52:00 -0400 Subject: [PATCH] bump migrations, and enable survey license check --- awx/main/access.py | 14 +++++++------- ...ow_surveys.py => 0045_v310_workflow_surveys.py} | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename awx/main/migrations/{0041_v310_workflow_surveys.py => 0045_v310_workflow_surveys.py} (93%) diff --git a/awx/main/access.py b/awx/main/access.py index a33503920f..e12adc60d6 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -1520,8 +1520,8 @@ class WorkflowJobTemplateAccess(BaseAccess): return True # will check this if surveys are added to WFJT - # if 'survey_enabled' in data and data['survey_enabled']: - # self.check_license(feature='surveys') + if 'survey_enabled' in data and data['survey_enabled']: + self.check_license(feature='surveys') return self.check_related('organization', Organization, data) @@ -1530,8 +1530,8 @@ class WorkflowJobTemplateAccess(BaseAccess): # check basic license, node count self.check_license() # if surveys are added to WFJTs, check license here - # if obj.survey_enabled: - # self.check_license(feature='surveys') + if obj.survey_enabled: + self.check_license(feature='surveys') # Super users can start any job if self.user.is_superuser: @@ -1540,9 +1540,9 @@ class WorkflowJobTemplateAccess(BaseAccess): return self.user in obj.execute_role def can_change(self, obj, data): - # # Check survey license if surveys are added to WFJTs - # if 'survey_enabled' in data and obj.survey_enabled != data['survey_enabled'] and data['survey_enabled']: - # self.check_license(feature='surveys') + # Check survey license if surveys are added to WFJTs + if 'survey_enabled' in data and obj.survey_enabled != data['survey_enabled'] and data['survey_enabled']: + self.check_license(feature='surveys') if self.user.is_superuser: return True diff --git a/awx/main/migrations/0041_v310_workflow_surveys.py b/awx/main/migrations/0045_v310_workflow_surveys.py similarity index 93% rename from awx/main/migrations/0041_v310_workflow_surveys.py rename to awx/main/migrations/0045_v310_workflow_surveys.py index 1df93bfe35..36cd0a78e0 100644 --- a/awx/main/migrations/0041_v310_workflow_surveys.py +++ b/awx/main/migrations/0045_v310_workflow_surveys.py @@ -8,7 +8,7 @@ import jsonfield.fields class Migration(migrations.Migration): dependencies = [ - ('main', '0040_v310_artifacts'), + ('main', '0044_v310_project_playbook_files'), ] operations = [