Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update user and user group queries to use machinery #304

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Dec 5, 2023

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated.
  • Changelog entry has been written

This updates some user and group queries to use machinery.

Notable changes include

  • Removal of the command list users and replaces it with list group-users. This command works best if provided the group name, but if not provided will attempt to get all groups and members. Not currently recommended for large lagoon installations.
  • Addition of list user-groups which if provided an email address will return the groups the user is in.
  • Addition of list all-users which will return all users within Lagoon (even those that are not in any groups) but does not return any information about the groups the user is in, use the list user-groups command for specific users.

All of these commands are RBAC wrapped, if you use these commands and get a permission denied, this is because you do not have permission to do the requested action.

  • list user-groups is scoped to self, and platform. You can't view another users groups, only your own.
  • list all-users is platform only
  • list group-users is scoped to groups you are a member of for a specific group, or platform for all groups

Changelog Entry

Requires

Closes

closes #271

@shreddedbacon shreddedbacon marked this pull request as ready for review December 5, 2023 21:54
Copy link
Contributor

@CGoodwin90 CGoodwin90 left a comment

Choose a reason for hiding this comment

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

lgtm

@shreddedbacon shreddedbacon merged commit 8057826 into main Dec 6, 2023
4 checks passed
@shreddedbacon shreddedbacon deleted the user-query-overhaul branch December 6, 2023 00:30
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.

List groups for a specific user
2 participants