syntax of Condition in Action filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2012 08:24 AM
i would like to disable document creation according to a user attribute. The best way would be to overload the create and import action filters, but i'm not sure it's possible, so, I just overloaded the newDocument action with a custom filter that checks against a user attribute but it seems i'm missing the right syntax. I'm runnig a 5.4.2 server.
<action icon="/icons/action_add.gif" id="newDocument" label="action.new.document" link="javascript:Richfaces.showModalPanel('selectDocTypePanel');">
<category>SUBVIEW_UPPER_LIST_HREF</category>
<filter-id>create</filter-id>
<filter-id>over_quota</filter-id>
<filter id="over_quota">
<rule grant="false">
<condition>#{userSession.currentUser.quota>99}</condition>
</rule>
</filter>
</action>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2012 12:34 PM
According to http
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2012 11:05 AM
Use ${currentUser.schemaName.fieldName}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2012 11:05 AM
I like quick answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2012 01:28 AM
Did you arrive with my answer ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2012 05:47 AM
nope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2012 05:04 AM
Is this working?
<condition>${currentUser.model.user.quota>20}</condition>
currentUser is an instance of NuxeoPrincipal. You need to get to its corresponding document model to retrieve properties on it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2012 06:43 AM
Unfortunately it seems not. I ve tried it using the "filters" and action "extension" point
