mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Merge pull request #1193 from AlanCoding/broken_no_launch
hide launch button for invalid JTs (using user_capabilities)
This commit is contained in:
commit
6a835b8a6b
@ -344,7 +344,7 @@ class BaseAccess(object):
|
||||
if 'write' not in getattr(self.user, 'oauth_scopes', ['write']):
|
||||
user_capabilities[display_method] = False # Read tokens cannot take any actions
|
||||
continue
|
||||
elif display_method == 'copy' and isinstance(obj, JobTemplate):
|
||||
elif display_method in ['copy', 'start', 'schedule'] and isinstance(obj, JobTemplate):
|
||||
if obj.validation_errors:
|
||||
user_capabilities[display_method] = False
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user