1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

hide launch button for invalid JTs

This commit is contained in:
AlanCoding 2018-04-02 11:58:02 -04:00
parent afd54a9ff9
commit d8f37e799b
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

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