@@ -42,7 +42,7 @@ func (uh *UserHandlers) GetUsers(c *gin.Context, params api.GetUsersParams) {
42
42
c .JSON (http .StatusInternalServerError , gin.H {"error" : "failed to get role" })
43
43
return
44
44
}
45
- if roleStr != "admin " {
45
+ if roleStr != "superuser " {
46
46
c .JSON (http .StatusForbidden , gin.H {"error" : "forbidden" })
47
47
return
48
48
}
@@ -96,7 +96,7 @@ func (uh *UserHandlers) DeleteUsers(c *gin.Context) {
96
96
c .JSON (http .StatusInternalServerError , gin.H {"error" : "failed to get role" })
97
97
return
98
98
}
99
- if roleStr != "admin " {
99
+ if roleStr != "superuser " {
100
100
c .JSON (http .StatusForbidden , gin.H {"error" : "forbidden" })
101
101
return
102
102
}
@@ -190,7 +190,7 @@ func (uh *UserHandlers) GetUserById(c *gin.Context, id int64) {
190
190
c .JSON (http .StatusInternalServerError , gin.H {"error" : "failed to get role" })
191
191
return
192
192
}
193
- if roleStr != "admin " {
193
+ if roleStr != "superuser " {
194
194
c .JSON (http .StatusForbidden , gin.H {"error" : "forbidden" })
195
195
return
196
196
}
@@ -229,7 +229,7 @@ func (uh *UserHandlers) UpdateUserById(c *gin.Context, id int64) {
229
229
c .JSON (http .StatusInternalServerError , gin.H {"error" : "failed to get role" })
230
230
return
231
231
}
232
- if roleStr != "admin " {
232
+ if roleStr != "superuser " {
233
233
c .JSON (http .StatusForbidden , gin.H {"error" : "forbidden" })
234
234
return
235
235
}
@@ -281,7 +281,7 @@ func (uh *UserHandlers) DeleteUserById(c *gin.Context, id int64) {
281
281
c .JSON (http .StatusInternalServerError , gin.H {"error" : "failed to get role" })
282
282
return
283
283
}
284
- if roleStr != "admin " {
284
+ if roleStr != "superuser " {
285
285
c .JSON (http .StatusForbidden , gin.H {"error" : "forbidden" })
286
286
return
287
287
}
0 commit comments