mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Fix Credential admin_role to add itself under the user.admin_role when it exists
This commit is contained in:
parent
75b8b0f4a6
commit
55564cc2b4
@ -164,6 +164,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
role_description='Owner of the credential',
|
||||
parent_role=[
|
||||
'team.admin_role',
|
||||
'user.admin_role',
|
||||
'singleton:' + ROLE_SINGLETON_SYSTEM_ADMINISTRATOR,
|
||||
],
|
||||
permissions = {'all': True}
|
||||
@ -180,7 +181,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
role_name='Credential User',
|
||||
role_description='May use this credential, but not read sensitive portions or modify it',
|
||||
parent_role= 'team.member_role',
|
||||
permissions = {'use': True}
|
||||
permissions = {'read': True, 'use': True}
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user