mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.7k stars 498 forks source link

Force login and private videos open to user groups #478

Closed netzih closed 1 year ago

netzih commented 2 years ago

Hi, I set up a mediacms server with docker and I'd like to keep the videos from being displayed to the public. I would like for users to be required to log in to be able to see any videos and upload videos. Also (maybe should be a separate issue), is there a way to create user groups and set videos to be open to certain groups only and others won't have access to it? (like setting it private but open to a certain group). Thanks.

Mozitux commented 2 years ago

Hi, for your first request, simply set this _PORTALWORKFLOW = "public" to this : _PORTALWORKFLOW = "private" In settings.py file line 18 (/home/mediacms.io/mediacms/cms/)

netzih commented 2 years ago

Thanks. I have a docker install, is it the same? Is it in deploy/docker/local_settings.py?

Mozitux commented 2 years ago

I don't use Docker, but the exact file to modify is "settings.py" on my side. It should be the same name for docker installation and single server, I think. Anyway, the local_settings.py configuration does not match settings.py, but it is in the same folder

EDIT: The folder should contain the following files: folders content mediacms

netzih commented 2 years ago

So I changed it to private and rebooted the docker images but I can still access the vidoes when not logged in. (I know it detected the change because I changed the time zone int hat file as well but I did it wrong at first so it would not boot up, So I know it is reading the changes I made)

illuminati05 commented 2 years ago

Hey guys i have the same problem like netzih in the first post. I want to share videos for all registered users. But i can only set private (only for me --> without tag search and categories listings) or public for all (also without login). It think there must be an option inside of the video settings for "registered users" (private, public, not listed, REGISTERED USERS)

s0ftcorn commented 1 year ago

I achieved this by setting:

USERS_CAN_SELF_REGISTER = False
GLOBAL_LOGIN_REQUIRED = True

That way i control the registration: by making accounts manually through admin interface and then setting their password through manage.py inside the container, since i dont want my users to need an email. Anyone without an login just sees the login screen and more importantly cant see any videos.