Skip to content

Commit 3efa62a

Browse files
committed
temporary fix
1 parent 6d02191 commit 3efa62a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/handlers/user.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ func (uh *UserHandlers) GetUserByUsername(c *gin.Context, username string) {
125125
if err != nil {
126126
return
127127
}
128-
if role != "superuser" {
128+
// TODO: temporary fix for admin role, need to verify if user exists when admin
129+
// creating user assigning role to zone, need to add an API for checking user existence
130+
if role != "superuser" && role != "admin" {
129131
c.JSON(http.StatusForbidden, gin.H{"error": "forbidden"})
130132
return
131133
}

0 commit comments

Comments
 (0)