-
Notifications
You must be signed in to change notification settings - Fork 976
Making Content Available Only for Logged Users in AVideo
To restrict video access to logged users on AVideo, follow these streamlined steps:
- Create User Groups: Define access by creating user groups.
- Add Content to Groups: Assign videos/live streams to these groups for controlled access.
-
Automate Associations:
- Use PredefinedCategory Plugin for automatic video grouping.
- Use CustomizeUser plugin for auto-adding new users to groups.
-
Bulk Updates (if needed):
- Run
addAllUsersIntoUserGroup.php
for existing users. - Run
addAllVideosIntoUserGroup.php
for existing videos.
- Run
User groups in AVideo control access to videos and live streams. To make content available only to logged users or specific groups of users, you first need to create and manage these groups.
-
Create a User Group: Begin by creating a user group. This group will be the basis for restricting access to your content. For detailed instructions, visit the Create non-public videos and deal with user groups guide on the AVideo wiki.
-
Add Videos or Live Streams to User Groups: Once you have a user group, you can add individual videos or live streams to it. This step ensures that only members of the group can access the content.
To streamline the process of associating new videos with a specific user group, you can use the PredefinedCategory Plugin.
- PredefinedCategory Plugin: This plugin allows you to automatically add all new videos to a predetermined user group. For setup instructions, refer to the PredefinedCategory Plugin documentation.
To view videos restricted to a user group, a user must be a member of that group.
- Manually Adding Users: You can manually add users to a user group through the AVideo platform's user management area.
- Automatically Adding New Users: If you wish to automatically add new sign-ups to a specific user group, adjust the settings in the CustomizeUser plugin. This ensures that all new users immediately gain access to the group-restricted content.
If your AVideo platform hosts a substantial library of content or serves a large user base, and you need to streamline the process of assigning existing videos and users to specific user groups, AVideo offers powerful command-line tools designed for these bulk operations. These commands are intended for one-time use to update your current setup efficiently:
-
Command:
php /var/www/html/AVideo/install/addAllUsersIntoUserGroup.php
- Purpose: This command adds all existing users on your platform to a designated user group. When you execute this command, you'll be prompted to choose the user group to which all users will be added. It's a one-time operation, ideal for initial setup or major group reassignments.
-
Command:
php /var/www/html/AVideo/install/addAllVideosIntoUserGroup.php
- Purpose: Similar to the command for users, this one adds all existing videos to a specific user group. Upon execution, you're asked to select the target user group for the videos. This one-time operation helps in quickly aligning your video content access policies with user group restrictions.
For the ongoing management of new users and videos, leveraging AVideo plugins automates the process and ensures consistent access control without the need for manual updates:
- Usage: Automatically adds new signed-up users to a predetermined user group. This ensures that all new users gain immediate access to group-restricted content based on your access control policies.
- Usage: Automatically assigns all new videos to a specific user group. This plugin streamlines content categorization and access control, making new videos immediately available to the right audience without manual intervention.
By following these steps, you can effectively manage who has access to your content on the AVideo platform, ensuring that videos and live streams are available only to specific users or groups. This approach enhances the privacy and exclusivity of your content, making it accessible only to your intended audience.