fix: update user field reference in GetAll method for correct access control
Deploy Application / deploy (push) Successful in 25s Details

This commit is contained in:
Habib Fatkhul Rohman 2025-11-21 14:38:12 +07:00
parent 99013ab88e
commit 79080ce64d
1 changed files with 1 additions and 1 deletions

View File

@ -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")