Skip to content

Commit

Permalink
fix: trimming access condition fail logs
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Sep 24, 2024
1 parent eba846c commit dd26acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -12313,7 +12313,7 @@ func HandleNewHook(resp http.ResponseWriter, request *http.Request) {

if (!(user.SupportAccess || user.Id == originalHook.Owner) || len(user.Id) == 0) && originalHook.Id != "" {
if originalHook.OrgId != user.ActiveOrg.Id && originalHook.OrgId != "" {
log.Printf("[WARNING] User %s (from org %s) doesn't have access to hook %s (org %s)", user.Username, user.ActiveOrg.Id, originalHook.Id, originalHook.OrgId)
log.Printf("[WARNING] User %s doesn't have access to hook %s", user.Username, originalHook.Id)
resp.WriteHeader(401)
resp.Write([]byte(`{"success": false, "reason": "User doesn't have access to hook"}`))
return
Expand Down

0 comments on commit dd26acd

Please sign in to comment.