Skip to content

Conversation

adfost
Copy link
Contributor

@adfost adfost commented Jun 23, 2021

Adding filtering to Users on Policy Details 123018790-0bad9080-d384-11eb-98a5-d0fd8ce96497

api
.invoke("GET", `/api/v1/policies/${policyName}/users`)
.then((result: any) => {
var resultUserArray = result.map((x: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not filter on an array of strings? I think it's simpler and needs less code

setLoadingUsers(false);
})
.catch((err) => {
console.log("Error in loading users");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display the error when loading users.
also se setLoadingUsers(false); on error

email: string;
is_me: boolean;
enabled: boolean;
name?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change still needed?

Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bexsoft bexsoft merged commit c7e195b into minio:master Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants