mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Add part of list to show audit trail by organization, still need to hook create to auto-establish the audit trail records.
This commit is contained in:
parent
cd0fee5406
commit
519b5ab77c
@ -90,7 +90,7 @@ class Tag(models.Model):
|
||||
return True
|
||||
|
||||
|
||||
class AuditTrail(CommonModel):
|
||||
class AuditTrail(models.Model):
|
||||
'''
|
||||
changing any object records the change
|
||||
'''
|
||||
|
||||
@ -269,8 +269,9 @@ class OrganizationsTest(BaseTest):
|
||||
org1_tags = self.get(org1_tags_url, expect=403, auth=self.get_other_credentials())
|
||||
|
||||
def test_get_item_subobjects_audit_trail(self):
|
||||
# FIXME
|
||||
pass
|
||||
url = '/api/v1/organizations/2/audit_trail/'
|
||||
self.get(url, expect=200, auth=self.get_normal_credentials())
|
||||
# FIXME: verify that some audit trail records are auto-created on save AND post
|
||||
|
||||
def test_post_item(self):
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ class OrganizationsAuditTrailList(BaseSubList):
|
||||
if not (self.request.user.is_superuser or self.request.user in organization.admins.all()):
|
||||
# FIXME: use: organization.can_user_administrate(self.request.user)
|
||||
raise PermissionDenied()
|
||||
return AuditTrail.objects.filter(audit_trail_by_tag__in = [ organization ])
|
||||
return AuditTrail.objects.filter(organization_by_audit_trail__in = [ organization ])
|
||||
|
||||
|
||||
class OrganizationsUsersList(BaseSubList):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user