feat: remove "view all users" from members #8447
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moved to #8650
What this does
Removes the rbac permission for users to read all other users on the site.
Closes #5002
Changes
Permission Changes
ResourceTypeUser
now owned byuser_id
of itself.member
couldread
all Users -->member
can read only themselvesOpen issues to resolve
All templates fetch the creator name. This is no longer able to be read.
coder/coderd/templates.go
Lines 682 to 692 in 04a2cae
created_by
andcreator_username
is now omitted if the user cannot view the creator. Meaning they can see templates created by themselves. Admins can still view all users.User counts are still being read
GetUsers
with sql filter rather than filtering the returned list. Now all counts are counts of the readable users for any given caller.Group members still return all users
If you grant a member
admin
on a template, they can see the permissions page. This page has a list of users/groups that can use/admin the template. Should this page show users they cannot read?