Skip to content

Commit

Permalink
review comment addressal related to url fragment check
Browse files Browse the repository at this point in the history
Signed-off-by: Rajshekar Chavakula <[email protected]>
  • Loading branch information
chavakula committed Mar 15, 2024
1 parent 0ad2ebe commit a3e6388
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions backend/apid/middlewares/authorization_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,8 @@ func (a AuthorizationAttributes) Then(next http.Handler) http.Handler {
attrs.Resource = types.LocalSelfUserResource
}

// check if request comes from webui
if strings.Contains(r.URL.Path, "/change_password") {
attrs.Resource = types.LocalSelfUserResource
}

switch vars["subresource"] {
case "password":
case "password", "change_password":
attrs.Resource = types.LocalSelfUserResource
}
}
Expand Down

0 comments on commit a3e6388

Please sign in to comment.