cancel
Showing results for 
Search instead for 
Did you mean: 

syntax of Condition in Action filter

pibou_Bouvret
Elite Collaborator
Elite Collaborator

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>
7 REPLIES 7

pibou_Bouvret
Elite Collaborator
Elite Collaborator

According to http

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Use ${currentUser.schemaName.fieldName}

I like quick answers

Did you arrive with my answer ?

nope

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

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

Unfortunately it seems not. I ve tried it using the "filters" and action "extension" point

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.