Skip to content

Commit

Permalink
Merge pull request #1545 from karelhala/service-account-groups
Browse files Browse the repository at this point in the history
Call real endpoint to receive service accounts for group
  • Loading branch information
fhlavac authored Oct 12, 2023
2 parents 79b8f8e + 3273c4f commit e42fc94
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@redhat-cloud-services/frontend-components-notifications": "^3.2.10",
"@redhat-cloud-services/frontend-components-utilities": "^3.5.0",
"@redhat-cloud-services/host-inventory-client": "^1.2.3",
"@redhat-cloud-services/rbac-client": "^1.2.2",
"@redhat-cloud-services/rbac-client": "^1.2.10",
"@unleash/proxy-client-react": "^3.6.0",
"axios-mock-adapter": "^1.20.0",
"babel-loader": "^8.2.3",
Expand Down
21 changes: 12 additions & 9 deletions src/helpers/group/group-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,17 @@ export async function fetchRolesForGroup(groupId, excluded, { limit, offset, nam
);
}

export async function fetchAccountsForGroup() {
return {
data: [
{ description: 'This is account 1', client_id: 'abra1234-ca56-da789-fg1011', owner: 'rhn-support1', time_created: 123456456 },
{ description: 'This is account 2', client_id: 'bbra1234-ca56-da789-fg1012', owner: 'rhn-support2', time_created: 123456478 },
],
meta: { count: 0 },
};
export async function fetchAccountsForGroup(groupId, usernames, options = {}) {
return await groupApi.getPrincipalsFromGroup(
groupId,
undefined,
usernames,
options.limit,
options.offset,
options.orderBy,
undefined,
'service-account'
);
}

export async function deleteRolesFromGroup(groupId, roles) {
Expand All @@ -150,7 +153,7 @@ export async function addRolesToGroup(groupId, roles) {
}

export async function fetchMembersForGroup(groupId, usernames, options = {}) {
return await groupApi.getPrincipalsFromGroup(groupId, usernames, options.limit, options.offset, options.orderBy);
return await groupApi.getPrincipalsFromGroup(groupId, undefined, usernames, options.limit, options.offset, options.orderBy);
}

export async function fetchMemberGroups(username) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/role/role-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getRoleApi } from '../shared/user-login';
const roleApi = getRoleApi();

export async function createRole(data) {
return await roleApi.createRoles(data);
return await roleApi.createRole(data);
}

export function fetchRoles({
Expand Down

0 comments on commit e42fc94

Please sign in to comment.