This project is read-only.

Content Security: Who can click?

Topics: Customizing Orchard, Writing modules
Aug 22, 2011 at 5:52 PM


Bottom line:

I would like to implement a "Who can click?" attribute for content, to go along with a "Who can see?" attribute. This will allow us to tease non-members into signing up in order to log in to view the entire piece of content (blogs, pages, lists, etc).

Support requirements:

1) Allow content to be visible to a specific set of roles (Who can see?).

2) Allow content to be additionally clickable to a specific set of roles (Who can click?)

a) If logged in, a nice message regarding your lack of credentials will be presented

b) If not logged in, then the standard login form will be presented

3) Would like to implement as a module with 100% compatibility.

4) Dynamically acquire additional roles for a user from a restful web service based on login id (future requirement).

Any pointers would be greatly appreciated.

Aug 22, 2011 at 7:06 PM

You should be able to achieve that by adding your own clickable or preview permission. The permission can then probably be checked from a handler, and failing to have permissions to see a details display type would redirect to the login page or to a page explaining how to subscribe.