-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/11/2010 08:24 PM, Deepa Priolkar wrote: > I have a basic requirement to show certain sections of a web page only to > users of specific role types. What is the best way of doing that using > ofbiz. Can we include-screen on basis of some role type checks? > > Thanks & Regards, > Deepa First have a look at:
http://www.opensourcestrategies.com/ofbiz/security.php https://cwiki.apache.org/OFBTECH/ofbiz-security.html For restricting sections of a page see some examples below. In Freemarker (.ftl files): (set a "hasPermission" variable in an action script before) <#if security.hasEntityPermission("SOME_PERMISSION", "_VIEW", session)> <form>...</form> <#else> <h3>${uiLabelMap.PagePermissionError}</h3> </#if> In Screens: <screen name="..."> <section> <condition> <if-has-permission permission="SOME_PERMISSION" action="_VIEW"/> </condition> <widgets> <include-screen name="SomethingYouWantToShow" location="..."/> </widgets> <fail-widgets> <include-screen name="NoPermission" location="..."/> </fail-widgets> </section> </screen> Cheers, René - -- René Scheibe * [email protected] TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Sitz: Unterföhring * Amtsgericht München * HRB 135082 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyzY8gACgkQUXs9EHvIuCrOUwCeP7BnUeQ+wKzFew4jShaSyHDg xe8An0K9Ja55uVxtUrtN7rd/UkBZDhsW =jDlG -----END PGP SIGNATURE-----
