mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 13:10:11 -03:30
Implement support for ad hoc commands.
This commit is contained in:
@@ -128,15 +128,17 @@ class Permission(CommonModelNameNotUnique):
|
||||
# the project parameter is not used when dealing with READ, WRITE, or ADMIN permissions.
|
||||
|
||||
permission_type = models.CharField(max_length=64, choices=PERMISSION_TYPE_CHOICES)
|
||||
run_ad_hoc_commands = models.BooleanField(default=False)
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode("Permission(name=%s,ON(user=%s,team=%s),FOR(project=%s,inventory=%s,type=%s))" % (
|
||||
return unicode("Permission(name=%s,ON(user=%s,team=%s),FOR(project=%s,inventory=%s,type=%s%s))" % (
|
||||
self.name,
|
||||
self.user,
|
||||
self.team,
|
||||
self.project,
|
||||
self.inventory,
|
||||
self.permission_type
|
||||
self.permission_type,
|
||||
'+adhoc' if self.run_ad_hoc_commands else '',
|
||||
))
|
||||
|
||||
def get_absolute_url(self):
|
||||
|
||||
Reference in New Issue
Block a user