1
0

Added methods to give users access to a list

This commit is contained in:
konrad
2018-08-30 08:58:09 +02:00
committed by kolaente
parent d31f16aff1
commit b1c3e92f66
10 changed files with 185 additions and 0 deletions

View File

@ -20,6 +20,10 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
lists, err := c.CObject.ReadAll(&currentUser)
if err != nil {
if models.IsErrNeedToHaveListReadAccess(err) {
return echo.NewHTTPError(http.StatusForbidden, "You need to have read access to this list.")
}
return echo.NewHTTPError(http.StatusInternalServerError, "An error occured.")
}