mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #9048 from AlexSCorey/8961-AuditorCanAddUserRoles
fixes erroneous render of add button Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
dfa65225d9
@ -98,8 +98,7 @@ function UserRolesList({ i18n, user }) {
|
||||
);
|
||||
|
||||
const canAdd =
|
||||
user?.summary_fields?.user_capabilities?.edit ||
|
||||
(actions && Object.prototype.hasOwnProperty.call(actions, 'POST'));
|
||||
actions && Object.prototype.hasOwnProperty.call(actions, 'POST');
|
||||
|
||||
const detailUrl = role => {
|
||||
const { resource_id, resource_type } = role.summary_fields;
|
||||
|
||||
@ -12,7 +12,7 @@ jest.mock('../../../api/models/Roles');
|
||||
|
||||
UsersAPI.readOptions.mockResolvedValue({
|
||||
data: {
|
||||
actions: { GET: {} },
|
||||
actions: { GET: {}, POST: {} },
|
||||
related_search_fields: [],
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user