syntax of Condition in Action filter

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="" link="javascript:Richfaces.showModalPanel('selectDocTypePanel');">
    <filter id="over_quota"> 
    <rule grant="false">
0 votes

2 answers



According to the ${'toto'} syntax works, but how can i access custom attributes ?

Is this working?


currentUser is an instance of NuxeoPrincipal. You need to get to its corresponding document model to retrieve properties on it

0 votes

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

&lt;filter append=&quot;true&quot; id=&quot;create&quot;&gt;
  &lt;rule grant=&quot;false&quot;&gt;

&lt;action icon=&quot;/icons/action_add.gif&quot; id=&quot;newDocument&quot; label=&quot;; link=&quot;javascript:Richfaces.showModalPanel(&apos;selectDocTypePanel&apos;);&quot;&gt;
&lt;filter id=&quot;over_quota&quot;&gt; 
&lt;rule grant=&quot;false&quot;&gt;




Use ${currentUser.schemaName.fieldName}

-1 votes

I like quick answers :)

Did you arrive with my answer ?

nope :

i ve overidden the user schema :

&lt;extension target=&quot;org.nuxeo.ecm.core.schema.TypeService&quot; point=&quot;schema&quot;&gt;
    &lt;schema name=&quot;user&quot; src=&quot;userShib.xsd&quot; override=&quot;true&quot; /&gt;

so, following your advice, i tried


that does not seem to work.