Active
Project:
Restricted content
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2009 at 09:33 UTC
Updated:
29 Mar 2010 at 17:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
triblondon commentedI'm working on a patch for this at the moment.
Comment #2
triblondon commentedOK, I've made significant progress with this. I've actually made a lot of changes to the module, mainly comprising:
1. Change to barrier page configuration to separate the two templates - one for logged in users, one for logged out users. We want our barrier pages to be completely different if you are not logged in at all.
2. I was confused by the fact that the ability to define access restrictions on a node automatically gave you the right to view the public version of the node, even if your user account did not have one of the roles that was allowed to view it. For our users it makes sense for this to be decoupled, and it also gives the editing user an easy way to see the effect of their access restrictions from the point of view of someone (themselves) that doesn't have access (the edit tab still appears and allows the user to edit the node).
3. I've added a [teaser] token that is populated with the node's teaser even in full page view mode, so that you can include the teaser in the barrier page.
4. Added tokens for [restricted-content-roles-required-list] and [restricted-content-roles-required-list-with-prefix]. These produce output such as "Editor, Webmaster or Member" and "an Editor, Webmaster or Member". The with-prefix bit just means the module makes the decision about whether to prepend an 'a' or an 'an' for you.
5. Added [site-login-url] along with [site-register-url], and modified both to contain a 'destination=' querystring parameter so that the user is redirected back to the content they originally wanted once logged in / registered.
This has somewhat outgrown a patch - in fact I've also added hundreds of lines of comments and function documentation, and renamed various bits to suit out implementation, but you're very welcome to the code if you want to integrate it into the module. Attached.