Logo
Explore Help
Sign In
tandem/campingmontagut
tandem/campingmontagut
2
0
Fork 0
You've already forked campingmontagut
Code Issues Pull Requests Packages Projects Releases Wiki Activity
campingmontagut/verify/edit_media.sql

8 lines
158 B
MySQL
Raw Normal View History

Manage all media uploads in a single place It made no sense to have a file upload in each form that needs a media, because to reuse an existing media users would need to upload the exact same file again; this is very unusual and unfriendly. A better option is to have a “centralized” media section, where people can upload files there, and then have a picker to select from there. Ideally, there would be an upload option in the picker, but i did not add it yet. I’ve split the content from the media because i want users to have the option to update a media, for instance when they need to upload a reduced or cropped version of the same photo, without an edit they would need to upload the file as a new media and then update all places where the old version was used. And i did not want to trouble people that uploads the same photo twice: without the separate relation, doing so would throw a constraint error. I do not believe there is any security problem to have all companies link their media to the same file, as they were already readable by everyone and could upload the data from a different company to their own; in other words, it is not worse than it was now.
2023-09-21 01:56:44 +02:00
-- Verify camper:edit_media on pg
begin;
select has_function_privilege('camper.edit_media(integer, text, camper.media_type, bytea)', 'execute');
rollback;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 33ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API