This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
project/sql/get_permissions_for_folder.sql

15 lines
255 B
MySQL
Raw Normal View History

2024-07-27 18:48:26 +00:00
SELECT
permission_type as "permission_type: PermissionRaw"
FROM
permissions
WHERE
folder_id = $1
AND user_id = $2
UNION
SELECT
'manage' as "permission_type: PermissionRaw"
FROM
folders
WHERE
folder_id = $1
AND owner_id = $2