fix: update user field reference in GetAll method for correct access control
Deploy Application / deploy (push) Successful in 25s
Details
Deploy Application / deploy (push) Successful in 25s
Details
This commit is contained in:
parent
99013ab88e
commit
79080ce64d
|
|
@ -102,7 +102,7 @@ func (w *warehouseController) GetAll(ctx *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if user.Name != constants.SUPERADMIN {
|
||||
if user.Username != constants.SUPERADMIN {
|
||||
clientId = ctx.MustGet("client_id").(string)
|
||||
} else {
|
||||
clientId = ctx.Query("client_id")
|
||||
|
|
|
|||
Loading…
Reference in New Issue