1

By using Channel Form, I've created a Wiki that currently allows a logged in member to edit content of articles on the front end.

I now need to set up access permissions on those articles, so access would only be granted if you've been invited to contribute to a specific article. Any articles you've not been invited to would be invisible.

  1. Am i using the correct third party module for this?

  2. Is this easy and if so, how?

1

User has a related members (authors) feature that lets you link multiple users to an entry. However, it does not give the same permissions as the "real" entry author. In a way, it is somewhat like a "Playa for users" where you can related members to an entry.

The {exp:user:authors} tag is the tag to use to list these related members. You could use this to display content only when the currently logged in member is a related member.

For example, let's assume you know the entry_id from the URL's {segment_3}:

{exp:user:authors
  entry_id="{segment_3}"
}
    {if logged_in_member_id == member_id}
       // Display your entry data
    {/if}
{/exp:user:authors}

Of course, you could start with {exp:channel:entries}, and have {exp:user:authors} inside to do something similar:

{exp:channel:entries /* your parameters */}
   {exp:user:authors entry_id="{entry_id}" dynamic="no"}
       {if logged_in_member_id == member_id}
         // Display your entry data
       {/if}
   {/exp:user:authors}
{/exp:channel:entries}

However, if you have parsing issues, you might need to use an embed for {exp:user:authors}.

1

I've done something similar before using Profile:Edit. I know it would work with Zoo Visitor too. I haven't used User, but as long as you can connect a member to a profile entry you should be able to pull this off.

The basic idea is that each member gets a channel entry in a members channel. Within that entry, there will be a Playa field, allowing entries from your articles channel to be selected.

Then on the edit template, you'd load the profile, and then find the entry you want to edit within the Playa field. If it's not found, then you show a permissions error or redirect or something.

You would also use the Playa field to output the list of entries the member can edit in whatever form of navigation you're using.

1
  • Thanks Jeremy. Great explanation. Can see how that would work. I'm going to do some experimenting, thanks a lot. – Alistair Chisholm Nov 22 '13 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.