mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
user: fix get user endpoint for non admin users
This commit is contained in:
parent
537e8362bf
commit
505358daaa
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ func getUser(c *gin.Context) {
|
|||
reqUserID, _ := c.Get(database.UserIDCtx)
|
||||
reqUserRole, _ := c.Get(database.UserRoleCtx)
|
||||
|
||||
if id != reqUserID && reqUserRole != "Admin" {
|
||||
if uint(id) != reqUserID && reqUserRole != "Admin" {
|
||||
helper.ForbiddenError(c, "Invalid authorization")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue