added a bit of zap logging
Some checks failed
Build and Push Docker Image / Build image (push) Failing after 58s
Some checks failed
Build and Push Docker Image / Build image (push) Failing after 58s
This commit is contained in:
@@ -116,6 +116,11 @@ func (con AuthApi) signUp(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
err = con.tokenHandler.DeleteInviteToken(ctx, token.Token)
|
||||
if err != nil {
|
||||
log.Printf("Failed to delete token %s", err)
|
||||
}
|
||||
|
||||
con.signIn(ctx)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ func AuthorizedTo(requiredPermissions models.Permission) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
claimsPointer, exists := ctx.Get("claims")
|
||||
if !exists {
|
||||
ctx.AbortWithError(500, fmt.Errorf("Did not call LoggedIn first"))
|
||||
ctx.AbortWithError(500, fmt.Errorf("did not call LoggedIn first"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -41,6 +41,5 @@ func AuthorizationEnforcer() gin.HandlerFunc {
|
||||
if !authorized.(bool) {
|
||||
ctx.AbortWithStatus(403)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user