Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images from non public articles should be protected #36

Open
sveetch opened this issue Jun 26, 2022 · 1 comment
Open

Images from non public articles should be protected #36

sveetch opened this issue Jun 26, 2022 · 1 comment
Labels
Enhancement Feature enhancement

Comments

@sveetch
Copy link
Member

sveetch commented Jun 26, 2022

Is your feature request related to a problem? Please describe.
Currently image from draft/private/non published are just reachable from anyone that know its link.

Although it is planned to hash media filename, which will make it impossible to guess, this is not a solution since the link can still be shared or used elsewhere.

Describe the solution you'd like
Media from non public articles should be protected. The more obvious solution is to implement the common "sendfile" method for webservers, like with django-sendfile2

@sveetch sveetch added Enhancement Feature enhancement Idea A feature or behavior idea labels Jun 26, 2022
@sveetch sveetch changed the title Images from non public article should not be protected Images from non public article should be protected Jun 26, 2022
@sveetch sveetch changed the title Images from non public article should be protected Images from non public articles should be protected May 23, 2023
@sveetch sveetch removed the Enhancement Feature enhancement label Jun 11, 2023
@sveetch sveetch added Enhancement Feature enhancement and removed Idea A feature or behavior idea labels Aug 7, 2023
@sveetch
Copy link
Member Author

sveetch commented Oct 15, 2024

This could be achieved with a custom filefield like from https://medium.com/@hiteshgarg14/how-to-dynamically-select-storage-in-django-filefield-bc2e8f5883fd obviously with inheritance of the smartmedia field.

Then Lotus should have two storage classes, one for public, another one for private. The usage of the second one should be conditioned to sendfile2 installation. Developers should be allowed to define a custom storage from setttings (for both public and private).

And then the dynamic filefield will select the private storage if article is private or not where it would be the public one.

There is however a matter of concern on how it will work when changing private status to public and vice versa since the file would have been saved in different storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature enhancement
Projects
None yet
Development

No branches or pull requests

1 participant