fixed lint + fmt

This commit is contained in:
kolaente 2018-09-12 21:45:30 +02:00
parent 1f3f8afa85
commit c018589749
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -89,9 +89,9 @@ func (l *List) checkListUserRight(user *User, r UserRight) bool {
Join("LEFT", []string{"users_namespace", "un"}, "un.namespace_id = l.namespace_id").
Join("LEFT", []string{"users_list", "ul"}, "ul.list_id = l.id").
Join("LEFT", []string{"namespaces", "n"}, "n.id = l.namespace_id").
Where("((ul.user_id = ? AND ul.right = ?) " +
"OR (un.user_id = ? AND un.right = ?) " +
"OR n.owner_id = ?)" +
Where("((ul.user_id = ? AND ul.right = ?) "+
"OR (un.user_id = ? AND un.right = ?) "+
"OR n.owner_id = ?)"+
"AND l.id = ?",
user.ID, r, user.ID, r, user.ID, l.ID).
Exist(&List{})