Added namespace user rights

This commit is contained in:
konrad 2018-09-04 20:15:24 +02:00 committed by kolaente
parent 422662e3e1
commit f2758e239c
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
12 changed files with 179 additions and 4 deletions

View file

@ -66,6 +66,9 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
if models.IsErrUserAlreadyHasAccess(err) {
return echo.NewHTTPError(http.StatusBadRequest, "This user already has access to this list.")
}
if models.IsErrUserAlreadyHasNamespaceAccess(err) {
return echo.NewHTTPError(http.StatusBadRequest, "This user already has access to this namespace.")
}
if models.IsErrInvalidUserRight(err) {
return echo.NewHTTPError(http.StatusBadRequest, "The right is invalid.")
}