mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 14:04:34 +00:00
Add file shares to Showcase source view
This commit is contained in:
17
runtime/nextcloud/update-showcase-source-view.sql
Normal file
17
runtime/nextcloud/update-showcase-source-view.sql
Normal file
@@ -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;
|
||||
Reference in New Issue
Block a user