mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat!: drop reading other 'user' permission (#8650)
* feat: drop reading other 'user' permission Members of the platform can no longer read or list other users. Resources that have "created_by" or "initiated_by" still retain user context, but only include username and avatar url. Attempting to read a user found via those means will result in a 404. * Hide /users page for regular users * make groups a privledged endpoint * Permissions page for template perms * Admin for a given template enables an endpoint for listing users/groups.
This commit is contained in:
@@ -195,6 +195,11 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// ResourceUserObject is a helper function to create a user object for authz checks.
|
||||
func ResourceUserObject(userID uuid.UUID) Object {
|
||||
return ResourceUser.WithID(userID).WithOwner(userID.String())
|
||||
}
|
||||
|
||||
// Object is used to create objects for authz checks when you have none in
|
||||
// hand to run the check on.
|
||||
// An example is if you want to list all workspaces, you can create a Object
|
||||
|
||||
Reference in New Issue
Block a user