mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
feat: Dbauthz is now default, remove out of experimental (#6650)
* feat: dbauthz always on, out of experimental * Add ability to do rbac checks in unit tests * Remove AuthorizeAllEndpoints * Remove duplicate rbac checks
This commit is contained in:
@ -1068,7 +1068,11 @@ func (q *querier) UpdateUserHashedPassword(ctx context.Context, arg database.Upd
|
||||
|
||||
err = q.authorizeContext(ctx, rbac.ActionUpdate, user.UserDataRBACObject())
|
||||
if err != nil {
|
||||
return err
|
||||
// Admins can update passwords for other users.
|
||||
err = q.authorizeContext(ctx, rbac.ActionUpdate, user.RBACObject())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return q.db.UpdateUserHashedPassword(ctx, arg)
|
||||
|
Reference in New Issue
Block a user