fmt + lint

This commit is contained in:
konrad 2018-07-12 00:37:31 +02:00 committed by kolaente
parent 4ae95c1333
commit 6f5cf55e42
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 5 additions and 5 deletions

View file

@ -51,6 +51,7 @@ func (user *User) IsNamespaceAdmin(namespace *Namespace) (err error) {
return ErrUserNeedsToBeNamespaceAdmin{UserID: user.ID, NamespaceID: namespace.ID}
}
// IsAdmin returns true or false if the user is admin on that namespace or not
func (n *Namespace) IsAdmin(user *User) bool {
// Owners always have admin rights

View file

@ -32,7 +32,6 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusForbidden, "You need to be list admin to do that.")
}
if models.IsErrNamespaceDoesNotExist(err) {
return echo.NewHTTPError(http.StatusNotFound, "The namespace does not exist.")
}