mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
bump migrations, and enable survey license check
This commit is contained in:
@@ -1520,8 +1520,8 @@ class WorkflowJobTemplateAccess(BaseAccess):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
# will check this if surveys are added to WFJT
|
# will check this if surveys are added to WFJT
|
||||||
# if 'survey_enabled' in data and data['survey_enabled']:
|
if 'survey_enabled' in data and data['survey_enabled']:
|
||||||
# self.check_license(feature='surveys')
|
self.check_license(feature='surveys')
|
||||||
|
|
||||||
return self.check_related('organization', Organization, data)
|
return self.check_related('organization', Organization, data)
|
||||||
|
|
||||||
@@ -1530,8 +1530,8 @@ class WorkflowJobTemplateAccess(BaseAccess):
|
|||||||
# check basic license, node count
|
# check basic license, node count
|
||||||
self.check_license()
|
self.check_license()
|
||||||
# if surveys are added to WFJTs, check license here
|
# if surveys are added to WFJTs, check license here
|
||||||
# if obj.survey_enabled:
|
if obj.survey_enabled:
|
||||||
# self.check_license(feature='surveys')
|
self.check_license(feature='surveys')
|
||||||
|
|
||||||
# Super users can start any job
|
# Super users can start any job
|
||||||
if self.user.is_superuser:
|
if self.user.is_superuser:
|
||||||
@@ -1540,9 +1540,9 @@ class WorkflowJobTemplateAccess(BaseAccess):
|
|||||||
return self.user in obj.execute_role
|
return self.user in obj.execute_role
|
||||||
|
|
||||||
def can_change(self, obj, data):
|
def can_change(self, obj, data):
|
||||||
# # Check survey license if surveys are added to WFJTs
|
# 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']:
|
if 'survey_enabled' in data and obj.survey_enabled != data['survey_enabled'] and data['survey_enabled']:
|
||||||
# self.check_license(feature='surveys')
|
self.check_license(feature='surveys')
|
||||||
|
|
||||||
if self.user.is_superuser:
|
if self.user.is_superuser:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import jsonfield.fields
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('main', '0040_v310_artifacts'),
|
('main', '0044_v310_project_playbook_files'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
Reference in New Issue
Block a user