Skip to content

Commit

Permalink
updating getUser func
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnyu committed Aug 19, 2024
1 parent 21b74cd commit 6b522e8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions controllers/userController.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ func GetUser(c *gin.Context) {
return
}

if !sessionCookies.IsAdmin {
ThrowError(http.StatusUnauthorized, "Must be logged in as an admin to access users management", c, isLoggedIn)
return
}

user, err := database.GetRedactedUser(sessionCookies.UserID)
if err != nil {
ThrowError(http.StatusUnauthorized, err.Error(), c, isLoggedIn)
Expand Down

0 comments on commit 6b522e8

Please sign in to comment.