Skip to content

Making Content Available Only for Logged Users in AVideo

Daniel Neto edited this page Feb 1, 2024 · 4 revisions

To restrict video access to logged users on AVideo, follow these streamlined steps:

  1. Create User Groups: Define access by creating user groups.
  2. Add Content to Groups: Assign videos/live streams to these groups for controlled access.
  3. Automate Associations:
    • Use PredefinedCategory Plugin for automatic video grouping.
    • Use CustomizeUser plugin for auto-adding new users to groups.
  4. Bulk Updates (if needed):

Step 1: Understanding User Groups

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.

Creating and Adding Content to User Groups

  1. 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.

  2. 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.

chrome-capture-2024-1-1

Step 2: Automating Video Association with User Groups

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.

Step 3: Adding Users to User Groups

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.

image

Step 4: Bulk Operations for Existing Content and Users

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:

Bulk Updating Existing Users and Videos

For Existing Users

  • 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.

For Existing Videos

  • 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.

Managing New Users and Videos

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:

CustomizeUser Plugin for New Users

  • 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.

PredefinedCategory Plugin for New Videos

  • 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.

Conclusion

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.

Clone this wiki locally