mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
bump migrations, and enable survey license check
This commit is contained in:
parent
8ff671bfd6
commit
1bd8bd245b
@ -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
|
||||
|
||||
@ -8,7 +8,7 @@ import jsonfield.fields
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0040_v310_artifacts'),
|
||||
('main', '0044_v310_project_playbook_files'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
Loading…
x
Reference in New Issue
Block a user