mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
Fix Credential admin_role to add itself under the user.admin_role when it exists
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user