LEFT JOIN groups ON pv.val<3 AND groups.uuid = links.head_uuid
WHERE links.link_class = 'permission'
UNION ALL
- SELECT owner_uuid, uuid, 3, true, CASE is_trashed WHEN true THEN 1 ELSE 0 END FROM groups
+ SELECT owner_uuid, uuid, 3, true, CASE
+ WHEN trash_at IS NOT NULL and trash_at < clock_timestamp() THEN 1
+ ELSE 0 END
+ FROM groups
),
perm (val, follow, user_uuid, target_uuid, trashed, startnode) AS (
SELECT 3::smallint AS val,
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: same name for trashed and persisted collections
+collection_in_trashed_subproject:
+ uuid: zzzzz-4zz18-trashedproj2col
+ portable_data_hash: 80cf6dd2cf079dd13f272ec4245cb4a8+48
+ owner_uuid: zzzzz-j7d0g-trashedproject2
+ created_at: 2014-02-03T17:22:54Z
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-d9tiejq69daie8f
+ modified_at: 2014-02-03T17:22:54Z
+ updated_at: 2014-02-03T17:22:54Z
+ manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
+ name: collection in trashed subproject
# Test Helper trims the rest of the file
name: Starred and shared active user project
description: Starred and shared active user project
group_class: project
+
+trashed_project:
+ uuid: zzzzz-j7d0g-trashedproject1
+ owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ name: trashed project
+ group_class: project
+ trash_at: 2001-01-01T00:00:00Z
+ delete_at: 2038-03-01T00:00:00Z
+ is_trashed: true
+
+trashed_subproject:
+ uuid: zzzzz-j7d0g-trashedproject2
+ owner_uuid:
+ name: trashed subproject
+ group_class: project
+ trash_at: 2001-01-01T00:00:00Z
+ delete_at: 2038-03-01T00:00:00Z
+ is_trashed: true