Thursday 01 May 2003 1:38:07 am
There is no built in access control (roles) for attributes, but you may achieve this in the templates. If you want this for all articles, edit (or create) an override template for your article template for full views. In this you make use of the fetch function for obtaining user info and act accordingly, for example in the demo setup, change : {attribute_view_gui attribute=$content_version.data_map.body} to
{let thisuser=fetch('user','current_user')}
{section show=$thisuser.is_logged_in}
{attribute_view_gui attribute=$content_version.data_map.body}
{section-else}
You need to <a href={'/user/login'|ezurl}>login</a> to see this sexy body
{/section} {/let} If you have a mix of public and semi-private articles, then copy the article class to a new one and use the override templates for this new class as shown above. hth Paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|