1
0

Return rights when reading a single item (#626)

Fix lint

Update docs

Fix loading all rights (list & namespace)

Add tests

Update web framework

Make tests run again

Update all calls to CanRead methods

Update task attachment & task comment & task rights to return the max right

Update team rights to return the max right

Update namespace rights to return the max right

Update list rights to return the max right

Update link share rights to return the max right

Update label rights to return the max right

Update web dependency

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/626
This commit is contained in:
konrad
2020-08-10 12:11:43 +00:00
parent 28b8cabea5
commit bd8c1c3bb7
36 changed files with 165 additions and 68 deletions

View File

@ -160,7 +160,7 @@ func (nu *NamespaceUser) Delete() (err error) {
func (nu *NamespaceUser) ReadAll(a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error) {
// Check if the user has access to the namespace
l := Namespace{ID: nu.NamespaceID}
canRead, err := l.CanRead(a)
canRead, _, err := l.CanRead(a)
if err != nil {
return nil, 0, 0, err
}