[development] req: role-specific content in pages

Frederik 'Freso' S. Olesen freso.dk at gmail.com
Thu Jul 19 10:57:20 UTC 2007


2007/7/19, David McNab <rebirth at orcon.net.nz>:
>On Wed, 2007-07-18 at 09:14 -0400, Richard Morse wrote:
>>Hi!  I solved this exact problem a while back:
>>
>>     http://drupal.org/project/restricted_text
>>
>>Instead of SGML like entities, it uses bracket-enclosed text.
>>
>>Also note that (as will probably happen with any module that does
>>this) this will adversely affect caching.
>
>I've installed your module in my Drupal 5.1.
>I created a page node with:
>
>        This line should be visible to all
>
>        [restrict:roles=authenticated user] This line should be visible
>        only to authenticated users.[/restrict]
>
>        [restrict:roles=admin] This line should be visible only to
>        admins.[/restrict]
>
>        And this is the last line visible to all
>
>But when I view it as an anonymous user or ordinary authenticated user,
>all lines are still visible.
>
>Is there anything I'm missing?

Are you applying content filters properly? Ie., make sure that you
have a filter that it includes it on site/admin/settings/filters and
that you have chosen that filter for your page node.

-- 
Frederik 'Freso' S. Olesen <http://freso.dk/>


More information about the development mailing list