fix: Add route for user to change own password (#1812)

This commit is contained in:
Garrett Delfosse
2022-05-27 17:29:55 +00:00
committed by GitHub
parent 608eb322a8
commit 24d1a6744a
6 changed files with 99 additions and 13 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func (api *API) assignableOrgRoles(rw http.ResponseWriter, r *http.Request) {
func (api *API) checkPermissions(rw http.ResponseWriter, r *http.Request) {
user := httpmw.UserParam(r)
if !api.Authorize(rw, r, rbac.ActionRead, rbac.ResourceUser.WithOwner(user.ID.String())) {
if !api.Authorize(rw, r, rbac.ActionRead, rbac.ResourceUser.WithID(user.ID.String())) {
return
}