Fix Credential admin_role to add itself under the user.admin_role when it exists

This commit is contained in:
Akita Noek
2016-03-16 13:16:26 -04:00
parent 75b8b0f4a6
commit 55564cc2b4

View File

@@ -164,6 +164,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
role_description='Owner of the credential', role_description='Owner of the credential',
parent_role=[ parent_role=[
'team.admin_role', 'team.admin_role',
'user.admin_role',
'singleton:' + ROLE_SINGLETON_SYSTEM_ADMINISTRATOR, 'singleton:' + ROLE_SINGLETON_SYSTEM_ADMINISTRATOR,
], ],
permissions = {'all': True} permissions = {'all': True}
@@ -180,7 +181,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
role_name='Credential User', role_name='Credential User',
role_description='May use this credential, but not read sensitive portions or modify it', role_description='May use this credential, but not read sensitive portions or modify it',
parent_role= 'team.member_role', parent_role= 'team.member_role',
permissions = {'use': True} permissions = {'read': True, 'use': True}
) )
@property @property