Skip to content
Snippets Groups Projects
Commit 0cfa506b authored by ale's avatar ale
Browse files

Log unauthorized access to a different user

parent 4e9a202b
No related branches found
No related tags found
No related merge requests found
......@@ -230,6 +230,7 @@ func (s *authService) authorizeUser(ctx context.Context, tx TX, req RequestBase)
// Requests are allowed if the SSO ticket corresponds to an admin, or if
// it identifies the same user that we're querying.
if !s.isAdmin(tkt) && tkt.User != req.Username {
log.Printf("unauthorized access from user %s to user %s", tkt.User, req.Username)
return nil, nil, ErrUnauthorized
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment