Memberships

Topics: Administration, Customizing Orchard
Feb 16, 2014 at 9:12 PM
Please tell me that this wonderful cms doesn't lack membership only content? I have been searching for it but am not able to find anything that explains why it's not available.
Developer
Feb 16, 2014 at 9:40 PM
What exactly do you mean?
Feb 16, 2014 at 10:27 PM
I really need to make area's of the website for registered members only, and the little that I have found made it seem that was not supported. Forgive me if I am wrong about this as I am new to the project.
Developer
Feb 17, 2014 at 12:19 AM
This is supported with multiple approaches (because you can set up access control for content items, a content item hierarchy, widgets - i.e. part of the layout -, URL patterns, or anything else if you write code). What specifically you mean by "area"?
Feb 17, 2014 at 1:11 AM
ok, so it seems that I might have been incorrect, but what do you expect from an orchard N00b? I would like to make a section of my website only accessible to users who have registered and are logged in. Piedone, if you know of a tutorial or an example of how to do this I would love to read it. Thanks so much for your help.
Feb 17, 2014 at 3:25 PM
Edited Feb 17, 2014 at 3:29 PM
Hello. Please try this:
  1. Go to modules and enable the module "Content Item Permissions".
  2. Go to "Content Definition".
  3. Edit "Page" content type.
  4. Tick in "Add Parts". Then add the part "Content Permission". Save the Page Content Type to apply your changes.,
    From now on when you create or edit a page you will be able to control who will be allowed to do what with your it.
To test that everything is ok:
  1. Create a new page.
    Set its title to Private" for example.
    Add some dummy content to the Body.
    Tick "Show on a menu", select "Main Menu" and set the Menu Text to something like "Private Area".
  2. Check "Enable Content Item access control". That will show a very complete array of checkboxes. Uncheck the "Anonymous" checkbox in the "View this item" column.
  3. "Publish Now".
  4. Now go to the frontend. You are logged in, so you can see and use the top menu link "Private Area".
  5. Now logout. The link "Private" disappears. Anonymous users are not allowed to view the page. If you try to access the page writing the url in the browser bar you will be asked for your user name and password.
Repeat the process for each page you want to be private.
You can apply this type of access control to any content type, not only to the page content type.

Btw: One more way to make some content visible to authenticated users only is through the "Widgets" menu in the dashboard. Any widget that you add to the "Authenticated" Layer won't be visible to anonymous users.

Hope it helps,
Feb 17, 2014 at 6:44 PM
mmolleja,
That was perfectly what I needed. I read something that said orchard didn't have that and I was floored, and really bummed because this whole project is great. I am looking forward to spinning up and becoming involved. thanks for helping.
Jul 10, 2014 at 3:11 PM
In this case, Should i remove "View All Content" permission from Anonymous role or it is not need? Does Content item permission override the role permission?