restricted access to attachments

Hello,

It is possible to prohibit viewing videos to unauthenticated users, it works well.

Would it be possible to have the same functionality for attachments ? Currently, attachments are accessible to connected users or not.

Thank you

Comments

  • You can hide the links if the video is marked as gated. You would just have to open the watch.phtml file and surround the attachments section with the same "if" statement that surrounds the video player.
  • edited September 29
    For example something like this:

    <?php if ($video->gated && !$loggedInUser): ?>
    // attachment code
    <?php endif; ?>
  • Thanks a lot. I have inversed the condition :


    <?php if (!$video->gated || $loggedInUser): ?>
    // attachment code
    <?php endif; ?>
Sign In or Register to comment.