From 520bda0dffb35abae54d9cc5c104aed7a813e9f2 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Mon, 17 Aug 2026 15:44:28 +0200 Subject: [PATCH] Add file shares to Showcase source view --- .../nextcloud/update-showcase-source-view.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 runtime/nextcloud/update-showcase-source-view.sql diff --git a/runtime/nextcloud/update-showcase-source-view.sql b/runtime/nextcloud/update-showcase-source-view.sql new file mode 100644 index 0000000..e4f07b3 --- /dev/null +++ b/runtime/nextcloud/update-showcase-source-view.sql @@ -0,0 +1,17 @@ +CREATE OR REPLACE VIEW piwigo_showcase_sources AS +SELECT + s.id AS share_id, + s.item_type, + s.file_target AS display_name, + st.id AS storage_id, + f.path AS source_path, + s.accepted, + s.permissions +FROM oc_share AS s +JOIN oc_filecache AS f ON f.fileid = s.file_source +JOIN oc_storages AS st ON st.numeric_id = f.storage +WHERE lower(s.share_with) = 'showcase' + AND s.item_type IN ('folder', 'file') + AND s.accepted = 1; + +GRANT SELECT ON piwigo_showcase_sources TO piwigo_reader;