mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Check license before launching job template and disallow scan job
template launch if license is unsupported
This commit is contained in:
@@ -997,7 +997,11 @@ class JobTemplateAccess(BaseAccess):
|
||||
def can_start(self, obj, validate_license=True):
|
||||
# Check license.
|
||||
if validate_license:
|
||||
self.check_license()
|
||||
k = {}
|
||||
if obj.job_type == PERM_INVENTORY_SCAN:
|
||||
print("In perm inv scan test")
|
||||
k = dict(feature='system_tracking')
|
||||
self.check_license(**k)
|
||||
|
||||
# Super users can start any job
|
||||
if self.user.is_superuser:
|
||||
|
||||
Reference in New Issue
Block a user