ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Assigning files or channel entries to individual users

February 24, 2011 4:36pm

Subscribe [2]
  • #1 / Feb 24, 2011 4:36pm

    Russ Back

    142 posts

    Hi

    I have a need to create a site that has files (or channel entries linked to files) only accessible to one user (plus administrators). I’m not talking about user groups - just individuals.

    The only way I can think to do this is to create a custom field type that uses a select menu populated with a list of users. Is this the best way to achieve it?

    Thanks

  • #2 / Feb 25, 2011 10:10am

    Ingmar

    29245 posts

    EE does not support per-user permissions. You can check for the member_id in your template with a conditional, though. What are you trying to achieve here? If you make the user author of “their” entry (although it’s been uploaded / authored by an admin) you can also make sure they only get to see “their” own entries.

  • #3 / Feb 25, 2011 11:50am

    Russ Back

    142 posts

    Basically I need an administrator to upload files to EE and make those uploads only available to specific members (they are video recordings of training workshops). So I’m thinking that if I have a custom fieldtype that lists the members, the template can check that the member selected in that field matches the logged in user ID and if not, redirects to a page with an ‘unathorised’ message.

    Unless there’s a better way of doing it of course… 😊

  • #4 / Feb 25, 2011 11:59am

    Ingmar

    29245 posts

    As I’ve said, have a Superadmin upload those files, then change the author to the client you want to be able to access them and use

    ... username="CURRENT_USER"

    or similar. Every user will then be shown “his” files.

  • #5 / Feb 25, 2011 12:07pm

    Russ Back

    142 posts

    Sorry, I misread your reply. Thanks for this!

  • #6 / Feb 25, 2011 4:19pm

    Sue Crocker

    26054 posts

    So is all OK then?

  • #7 / Feb 28, 2011 4:34am

    Russ Back

    142 posts

    Yes. Thanks.

  • #8 / Feb 28, 2011 3:22pm

    Ingmar

    29245 posts

    Very glad to hear it. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases