Skip to content

Commit

Permalink
condition change to support password reset
Browse files Browse the repository at this point in the history
Signed-off-by: Rajshekar Chavakula <[email protected]>
  • Loading branch information
chavakula committed Feb 14, 2024
1 parent 9587df6 commit 37c80f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/apid/middlewares/authorization_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ func (a AuthorizationAttributes) Then(next http.Handler) http.Handler {
attrs.Resource = types.LocalSelfUserResource
}

// Change the resource to LocalSelfUserResource if a user tries to change
// its own password
if attrs.Verb == "update" && vars["subresource"] == "password" {
switch vars["subresource"] {
case "password", "":
attrs.Resource = types.LocalSelfUserResource
}
}
Expand Down

0 comments on commit 37c80f4

Please sign in to comment.