-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Not A Bug
-
Affects Version/s: 5.8
-
Fix Version/s: None
-
Component/s: Actions & Filters
-
Backlog priority:900
-
Team:AT
-
Sprint:nxAT Sprint 9.1.6, nxAT Sprint 9.1.7, nxAT Sprint 9.1.8, nxAT Sprint 9.1.9, nxAT Sprint 9.3.3
-
Story Points:2
The document associated to an action context, which is used to evaluate action filters, has changed between 5.6 and 5.8 (LTS versions where the change has been detected). This is mainly visible during document creation:
- 5.6: the current document in the action context is the container (parent of the document which will be created)
- 5.8: the current document in the action context is the document to create, with no reference to the repository
This makes the permission evaluation fail now with the following stacktrace
ERROR [nuxeo-error-log] javax.servlet.ServletException: /widgets/actions/document_actions_widget_template.xhtml @12,16 value="#{webActions.getDocumentActions(actionContextDocument, widgetProperty_category, not widgetProperty_disableFiltered, widgetProperty_postFilter)}" /widgets/actions/document_actions_widget_template.xhtml @12,16 value="#{webActions.getDocumentActions(actionContextDocument, widgetProperty_category, not widgetProperty_disableFiltered, widgetProperty_postFilter)}": java.lang.IllegalArgumentException: null docRref ... Caused by: javax.el.ELException: /widgets/actions/document_actions_widget_template.xhtml @12,16 value="#{webActions.getDocumentActions(actionContextDocument, widgetProperty_category, not widgetProperty_disableFiltered, widgetProperty_postFilter)}": java.lang.IllegalArgumentException: null docRref at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:356) ... 175 more Caused by: javax.el.ELException: java.lang.IllegalArgumentException: null docRref ... Caused by: java.lang.IllegalArgumentException: null docRref at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:320) at org.nuxeo.ecm.core.api.AbstractSession.hasPermission(AbstractSession.java:304) at org.nuxeo.ecm.platform.actions.DefaultActionFilter.checkPermissions(DefaultActionFilter.java:242) at org.nuxeo.ecm.platform.actions.DefaultActionFilter.checkRule(DefaultActionFilter.java:168) at org.nuxeo.ecm.platform.actions.DefaultActionFilter.accept(DefaultActionFilter.java:110) at org.nuxeo.ecm.platform.actions.ActionService.checkFilters(ActionService.java:301) at org.nuxeo.ecm.platform.actions.ActionService.checkFilters(ActionService.java:140) at org.nuxeo.ecm.platform.actions.ActionService.applyFilters(ActionService.java:121) at org.nuxeo.ecm.platform.actions.ActionService.getActions(ActionService.java:169) at org.nuxeo.ecm.webapp.action.WebActionsBean.getActions(WebActionsBean.java:129) at org.nuxeo.ecm.webapp.action.WebActionsBean.getDocumentActions(WebActionsBean.java:101)
This contribution helps to reproduce the bug in 5.8+ when trying to create a File document.
<component name="org.nuxeo.ecm.platform.actions.more"> <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions"> <action id="CreationDocument" label="Création" enabled="true" order="0" type="link" immediate="false" link="#{operationActionBean.doOperation('Bouton_Verification')}"> <category>CREATE_DOCUMENT_FORM</category> <filter id="filter@CreationDocument"> <rule grant="true"> <permission>permAdministrateur</permission> <permission>permUtilisateur</permission> <permission>permGestionnaire</permission> <type>File</type> </rule> <rule grant="false"> <condition>document.isImmutable() || document.isProxy()</condition> </rule> </filter> </action> </extension> </component>
- is required by
-
NXP-12605 Add access key navigation with actions
- Resolved