Fix to ensure org auditors can see team credentials

#3081
This commit is contained in:
Akita Noek
2016-08-10 16:58:39 -04:00
parent e55de3d073
commit d181aefddf
6 changed files with 141 additions and 1 deletions

View File

@@ -87,6 +87,11 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
on_delete=models.CASCADE,
related_name='credentials',
)
teams = models.ManyToManyField(
'Team',
blank=True,
related_name='credentials',
)
kind = models.CharField(
max_length=32,
choices=KIND_CHOICES,
@@ -226,6 +231,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
read_role = ImplicitRoleField(parent_role=[
'singleton:' + ROLE_SINGLETON_SYSTEM_AUDITOR,
'organization.auditor_role',
'teams.auditor_role',
'use_role',
'admin_role',
])