Merge pull request #2538 from wwitzel3/issue-2349

Credential bug fixes for access and uniqueness
This commit is contained in:
Wayne Witzel III
2016-06-21 16:40:14 -04:00
committed by GitHub
5 changed files with 69 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
class Meta:
app_label = 'main'
ordering = ('kind', 'name')
unique_together = (('organization', 'name', 'kind'),)
deprecated_user = models.ForeignKey(
'auth.User',
@@ -224,8 +225,9 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
)
read_role = ImplicitRoleField(parent_role=[
'singleton:' + ROLE_SINGLETON_SYSTEM_AUDITOR,
'organization.auditor_role',
'use_role',
'owner_role'
'owner_role',
])
@property