Skip to content

Commit

Permalink
Fixed update
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Jan 25, 2024
1 parent 0ea1c4d commit 9d8bde1
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/handlers/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,17 @@ func MakeUpdateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand
}

mcUntyped, mcExists := c.Get("mc")
uidOrigin, uidExists := c.Get("uid_origin")

if !mcExists {
c.String(http.StatusInternalServerError, fmt.Sprintf("Missing multitenancy config"))
}
if !uidExists {
c.String(http.StatusInternalServerError, fmt.Sprintf("Missing EGI user uid"))
}

mc, mcParsed := mcUntyped.(*auth.MultitenancyConfig)
uid, uidParsed := uidOrigin.(string)

if !mcParsed {
c.String(http.StatusInternalServerError, fmt.Sprintf("Error parsing multitenancy config: %v", mcParsed))
}

if !uidParsed {
c.String(http.StatusInternalServerError, fmt.Sprintf("Error parsing uid origin: %v", uidParsed))
}

// Check if users in allowed_users have a MinIO associated user
minIOAdminClient, _ := utils.MakeMinIOAdminClient(cfg)
uids := mc.CheckUsersInCache(newService.AllowedUsers)
Expand Down

0 comments on commit 9d8bde1

Please sign in to comment.