Let rights methods return errors (#64)
This commit is contained in:
parent
11e7c071ce
commit
47352d3ed4
44 changed files with 282 additions and 220 deletions
|
|
@ -91,7 +91,11 @@ func getNamespace(c echo.Context) (namespace models.Namespace, err error) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
if !namespace.CanRead(user) {
|
||||
canRead, err := namespace.CanRead(user)
|
||||
if err != nil {
|
||||
return namespace, err
|
||||
}
|
||||
if !canRead {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue