Skip to content

Commit

Permalink
fix: update aal requirements to update user
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 5, 2024
1 parent 9d419b4 commit 7c0a128
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func (a *API) UserUpdate(w http.ResponseWriter, r *http.Request) error {

user := getUser(ctx)
session := getSession(ctx)
// Change to check for verified
// Allow for metadata update
if len(user.Factors) != 0 && session.AAL != models.AAL2 {

Check failure on line 94 in internal/api/user.go

View workflow job for this annotation

GitHub Actions / test (1.22.x)

invalid operation: session.AAL != models.AAL2 (mismatched types *string and models.AuthenticatorAssuranceLevel)
return unauthorizedError("need aal2")

Check failure on line 95 in internal/api/user.go

View workflow job for this annotation

GitHub Actions / test (1.22.x)

undefined: unauthorizedError
}

if err := a.validateUserUpdateParams(ctx, params); err != nil {
return err
Expand Down

0 comments on commit 7c0a128

Please sign in to comment.