Skip to content

Conversation

@sampaiodiego
Copy link
Member

Proposed changes (including videos or screenshots)

Moving this code to a service to make it re-usable and also adding a small cache since this info doesn't change very often.

Issue(s)

Steps to test or reproduce

Further comments

@sampaiodiego sampaiodiego requested a review from a team June 14, 2021 14:26
},
};

const users = await this.Users.findUsersInRoles(roleIds, null, options).toArray();
Copy link
Member

Choose a reason for hiding this comment

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

If there happens to be a role all users have, this query may return the whole list of users (which can be quite big). Any plans to paginate this? 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

I see 🤔 I didn't change the previous behavior though.. maybe we should deprecate this method 🤔

Copy link
Member

@KevLehman KevLehman Jun 15, 2021

Choose a reason for hiding this comment

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

Yeah 🤔 that would be a good thing, other than that, the code looks good, so I don't know if I should approve and after that create a task to deprecate this one 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, I'll create a task to deprecate this 👍

@sampaiodiego sampaiodiego merged commit f21acee into develop Jun 16, 2021
@sampaiodiego sampaiodiego deleted the improve-getUserRoles branch June 16, 2021 03:54
@sampaiodiego sampaiodiego mentioned this pull request Jun 28, 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.

4 participants