add api for managing credential input sources

This commit is contained in:
Jake McDermott
2019-01-30 17:01:00 -05:00
parent c209955400
commit d87144c4a7
11 changed files with 262 additions and 3 deletions

View File

@@ -30,8 +30,8 @@ from awx.main.utils import (
)
from awx.main.models import (
ActivityStream, AdHocCommand, AdHocCommandEvent, Credential, CredentialType,
CustomInventoryScript, Group, Host, Instance, InstanceGroup, Inventory,
InventorySource, InventoryUpdate, InventoryUpdateEvent, Job, JobEvent,
CredentialInputSource, CustomInventoryScript, Group, Host, Instance, InstanceGroup,
Inventory, InventorySource, InventoryUpdate, InventoryUpdateEvent, Job, JobEvent,
JobHostSummary, JobLaunchConfig, JobTemplate, Label, Notification,
NotificationTemplate, Organization, Project, ProjectUpdate,
ProjectUpdateEvent, Role, Schedule, SystemJob, SystemJobEvent,
@@ -1163,6 +1163,19 @@ class CredentialAccess(BaseAccess):
return self.can_change(obj, None)
class CredentialInputSourceAccess(BaseAccess):
'''
I can see credential input sources when:
- I'm a superuser (TODO: Update)
I can create credential input sources when:
- I'm a superuser (TODO: Update)
I can delete credential input sources when:
- I'm a superuser (TODO: Update)
'''
model = CredentialInputSource
class TeamAccess(BaseAccess):
'''
I can see a team when: