1
0

Update web handler (fixed)

This commit is contained in:
kolaente
2019-03-29 18:29:44 +01:00
parent 81f76f09ce
commit e21471a193
8 changed files with 31 additions and 14 deletions

View File

@ -42,11 +42,11 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
}
// Check rights
canRead, err := currentStruct.CanCreate(currentAuth)
canCreate, err := currentStruct.CanCreate(currentAuth)
if err != nil {
return HandleHTTPError(err, ctx)
}
if canRead {
if !canCreate {
config.LoggingProvider.Noticef("Tried to create while not having the rights for it (User: %v)", currentAuth)
return echo.NewHTTPError(http.StatusForbidden)
}