Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ivan 165 posts 543 karma points
    Nov 21, 2013 @ 18:28
    Ivan
    0

    Is it possible to hide protected items? Instead of showing the login form?

    Hi everybody.

    On the frontend there's a list of PDF files from the Media section. Users should be able to see only the files which they have access to.

    How do I do that?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Nov 21, 2013 @ 19:02
    Richard Soeteman
    100

    Hi Ivan,

    You can do that with the Library methods. assuming you use Razor add a reference to MediaProtect.Library and then use

    the Library.HasAccess method (which needs the node id and the node path)to check if the user has access to the media item. If you need more help please provide the snippet you want to have the check in. Then I can the method call in that snippet.

    Best,

    Richard

  • Ivan 165 posts 543 karma points
    Nov 21, 2013 @ 19:15
    Ivan
    0

    Hi Richard.

    Thanks. I think,this is it. Will let you know, if that doesn't work out, but I think it should.

Please Sign in or register to post replies

Write your reply to:

Draft