Hi Thierry, [quote]Some actions have to be available in the action bar only if a property has a defined value (like "YES" for example)[/quote]
For this you need a custom action availability class. Extend AbstractAvailabilityRule, add logic to check for the "YES" property value, and configure your class in the ruleClass property. http://documentation.magnolia-cms.com/display/DOCS/Action+definition#Availability http://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/ui/5.0.4/apidocs/index.html?info/magnolia/ui/api/availability/AbstractAvailabilityRule.html [quote]In the workbench a column contains a checkbox only activated for a specific user role[/quote] Column definitions support the availability ruleClass property too. The property is not documented yet but look at the Javadoc. It likely works the same way as in actions. http://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/ui/5.0.4/apidocs/index.html?info/magnolia/ui/workbench/column/definition/ColumnDefinition.html http://documentation.magnolia-cms.com/display/DOCS/Column+definition [quote]In my sub app, some fields have to be shown only for a list of user roles[/quote] Field definitions don't support availability rules. Perhaps somebody else can confirm this? http://documentation.magnolia-cms.com/display/DOCS/Common+field+properties However, the basic mechanism for setting permissions per role exists. It is used in the App Launcher. See if you can repurpose the functionality. http://documentation.magnolia-cms.com/display/DOCS/App+launcher+layout --Antti -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=54ef055b-b935-4a9b-b8ad-96b40920f058 You are invited to Magnolia Conference. Less than a month to go! Register now: http://www.magnolia-cms.com/conference/register.html ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
