Refactor ListTask to Task #92
|
@ -130,6 +130,9 @@ func (l *List) checkRight(a web.Auth, rights ...Right) (bool, error) {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user is the owner of a namespace, it has any right, all the time
|
||||||
|
conds = append(conds, builder.Eq{"n.owner_id": a.GetID()})
|
||||||
|
|
||||||
exists, err := x.Select("l.*").
|
exists, err := x.Select("l.*").
|
||||||
Table("list").
|
Table("list").
|
||||||
Alias("l").
|
Alias("l").
|
||||||
|
|
|
@ -84,7 +84,7 @@ func TestTeamList(t *testing.T) {
|
||||||
tl5 := tl
|
tl5 := tl
|
||||||
tl5.ListID = 2
|
tl5.ListID = 2
|
||||||
_, err = tl5.ReadAll("", &u, 1)
|
_, err = tl5.ReadAll("", &u, 1)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err) //
|
||||||
|
|
||||||
// Test read all for a list where the user not has access
|
// Test read all for a list where the user not has access
|
||||||
tl6 := tl
|
tl6 := tl
|
||||||
|
|
Loading…
Reference in New Issue
Block a user