bump migrations, and enable survey license check

This commit is contained in:
AlanCoding 2016-10-28 11:52:00 -04:00
parent 8ff671bfd6
commit 1bd8bd245b
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -8,7 +8,7 @@ import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('main', '0040_v310_artifacts'),
('main', '0044_v310_project_playbook_files'),
]
operations = [