You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Gavin Mabie <ga...@urbannex.co.za> on 2011/02/24 10:22:28 UTC

Content Permissions

Hi

 

Can anybody give me a short answer on how to give view permission to an
anonymous/guest user to view content.  I am  using
"/content/control/stream?contentId " in an FTL to show images but it only
displays when I log onto the ContentMgr application on the back end.

 

Thanks in advance.

 

Gav


Re: Content Permissions

Posted by Divesh Dutta <di...@hotwaxmedia.com>.
You can do a trick to handle this:

Its genericContentPermission service which executes, when you use /content/control/stream?contentId.  So you write SECA rule in your component on service genericContentPermission:

Rule should be: When ever genericContentPermission runs, your new custom service should run as action service. This new service will implement permissionInterface in service definition. And in implementation you may add your rules to return hasPermission = "true" or you may directly return hasPermission = "true" . 

Your seca rule will look like this:

<eca service="genericContentPermission" event="return" run-on-failure="true">
  <condition field-name="hasPermission" operator="equals" value="false" type="Boolean"/>
  <action service="yourCustomerService" mode="sync" result-to-result="true"/>
</eca>

Thanks
--
Divesh Dutta.



On Feb 24, 2011, at 2:52 PM, Gavin Mabie wrote:

> Hi
> 
> 
> 
> Can anybody give me a short answer on how to give view permission to an
> anonymous/guest user to view content.  I am  using
> "/content/control/stream?contentId " in an FTL to show images but it only
> displays when I log onto the ContentMgr application on the back end.
> 
> 
> 
> Thanks in advance.
> 
> 
> 
> Gav
>