As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<!– Actions for a document in the Browse screen –> <action-group id="document_browse"> <show-link>false</show-link> <style-class>inlineAction</style-class> <action idref="edit_doc_http" /> <action idref="edit_doc_webdav" /> <action idref="edit_doc_cifs" /> <action idref="checkout_doc" /> <action idref="checkin_doc" /> <action idref="details_doc" /> <action idref="delete_doc" hide="true" /> </action-group>
<!– Actions for a document in the Browse screen –> <action-group id="document_browse"> <show-link>false</show-link> <style-class>inlineAction</style-class> <action idref="edit_doc_http" hide="true" /> <action idref="edit_doc_webdav" /> <action idref="edit_doc_cifs" /> <action idref="checkout_doc" hide="true" /> <action idref="checkin_doc" hide="true" /> <action idref="details_doc" hide="true" /> <action idref="delete_doc" hide="true" /> </action-group>
javax.faces.FacesException: Illegal Capacity: -2 caused by: org.apache.jasper.JasperException: Illegal Capacity: -2 caused by: java.lang.IllegalArgumentException: Illegal Capacity: -2
<config replace="true"> <actions> <action-group id="document_browse"> <!– ici uniquement les actions à mettre –> </action-group> </action> </config>
<action-group id="document_browse"> <show-link>false</show-link> <style-class>inlineAction</style-class> <action idref="edit_doc_http" hide="true" /> <action idref="edit_doc_webdav" /> <action idref="edit_doc_cifs" /> <action idref="checkout_doc" hide="true" /> <action idref="checkin_doc" hide="true" /> <action idref="details_doc" hide="true" /> <action idref="delete_doc" hide="true" /> </action-group>
<action-group id="document_browse"> <action idref="edit_doc_http" hide="true" /> <action idref="checkout_doc" hide="true" /> <action idref="checkin_doc" hide="true" /> <action idref="details_doc" hide="true" /> <action idref="delete_doc" hide="true" /> </action-group>
package org.alfresco.delegation.evaluator; import javax.faces.context.FacesContext; import org.alfresco.delegation.aspects.DelegIGRootAspect; import org.alfresco.service.cmr.security.AccessStatus; import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; public class DirAccessEvaluator implements ActionEvaluator { public boolean evaluate(Node node) { AuthenticationService auth = Repository.getServiceRegistry( FacesContext.getCurrentInstance()).getAuthenticationService(); // don't do anything if it's root og an IG if (!node.hasAspect(DelegIGRootAspect.ASPECT_IGROOT)) { return false; } if (auth.isCurrentUserTheSystemUser()) { return false; } // check if LeaderCI PermissionService permService = Repository.getServiceRegistry( FacesContext.getCurrentInstance()).getPermissionService(); if (permService.hasPermission(node.getNodeRef(), "DirAccess") == AccessStatus.ALLOWED && permService.hasPermission(node.getNodeRef(), "DirManageMembers") != AccessStatus.ALLOWED ) { return true; } return false; } }
<!– go to the page chowing users access profile no edition alowed –> <action id="access_dir"> <evaluator> org.alfresco.delegation.evaluator.DirAccessEvaluator </evaluator> <label-id>access_dir</label-id> <image>/images/extension/icons/invite_deleg_users.gif</image> <action>dialog:manageDelegInvitedUsers</action> <action-listener>#{BrowseBean.setupSpaceAction}</action-listener> <params> <param name="id">#{actionContext.id}</param> </params> </action>
<!– Action for adding content - quick upload –> <action-group id="add_content_menu"> <style>white-space:nowrap</style> <action idref="add_adm_content" /> </action-group>
<nobr> <r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2"> <a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" /> </r:permissionEvaluator> </nobr>
<action id="check_out_document"> <evaluator> org.alfresco.community.delegation.evaluator.DirAccessEvaluator </evaluator> <label-id>access_dir</label-id> <image>/images/extension/icons/create_user.gif</image> <!–action>dialog:manageDelegInvitedUsers</action> <action-listener>#{BrowseBean.setupSpaceAction}</action-listener–> <action>…</action> <action-listener>…</action-listener> <params> <param name="id">#{actionContext.id}</param> </params> </action> <!– Actions Menu for a document in the Browse screen –> <action-group id="document_browse_menu"> <action idref="check_out_document" /> </action-group> </actions> </config>
<action>…</action> <action-listener>…</action-listener>
Je ne sais pas exactement sur quels critères tu veux brider cette action mais tu peux changer dans browse.jsp le paramétrage du <rermissionEvaluator> ou alors mettre autour un tag <r:actionInstanceEvaluator> qui pourra afficher/masquer l'entrée de menu selon des critères custom. Il suffit alors de définir une classe implémentant l'interface ActionEvaluator dont tu spécifie le nom (paquetage inclus) dans le tag <r:actionInstanceEvaluator>.Attention, bien penser à ajouter la classe custom d'evaluator dans le classpath Alfresco (JAR dans WEB-INF/lib par exemple).
<r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2"> <r:actionInstanceEvaluator evaluatorClassName="org.alfresco.web.config.MonNodeTypeActionEvaluator" value="#{NavigationBean.currentNode}"> <a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" /> </r:actionInstanceEvaluator> </r:permissionEvaluator>
javax.faces.FacesException: Client-id : _idJsp16 is duplicated in the faces tree. Component : browse:_idJsp16, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp16]} at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.jasper.JasperException: Client-id : _idJsp16 is duplicated in the faces tree. Component : browse:_idJsp16, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp16]} at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:383) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
<r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2"> <r:actionInstanceEvaluator id="monid1" evaluatorClassName="org.atosorigin.web.config.CanCreateContentActionEvaluator" value="#{NavigationBean.currentNode}"> <a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" /> </r:actionInstanceEvaluator> </r:permissionEvaluator>
<config> <actions> <!– Manage Space Rules –> <action id="manage_space_rules"> <permissions> <permission allow="true">ChangePermissions </permission> </permissions> <evaluator> org.alfresco.module.msc.action.evaluator.MscAdminEvaluator </evaluator> <label-id>manage_rules</label-id> <image>/images/icons/rule.gif</image> <action>dialog:manageRules</action> <action-listener>#{BrowseBean.setupSpaceAction} </action-listener> <params> <param name="id">#{actionContext.id}</param> </params> </action> <!– Forcer le deverouillage de tous les documents –> <action id="deverouiller_tout_action_id"> <permissions> <permission allow="true">Write</permission> </permissions> <evaluator> org.alfresco.module.msc.action.evaluator.MscAdminEvaluator </evaluator> <label-id>deverouiller_tout_action_label_id </label-id> <image>/images/icons/unlock.gif </image> <action>browse</action> <action-listener>#{MscAction.forceUnlockAll} </action-listener> </action> <!– Actions Menu for More Actions in Browse screen –> <action-group id="browse_actions_menu"> <!– Disponible –> <action idref="add_adm_content" /> <action idref="run_action" /> <action idref="manage_space_rules" /> <action idref="delete_space" /> <action idref="deverouiller_tout_action_id" /> <!– Masquer –> <action idref="details_space" hide="true" /> <action idref="cut_node" hide="true" /> <action idref="copy_node" hide="true" /> <action idref="paste_all" hide="true" /> <action idref="import_space" hide="true" /> <action idref="manage_space_users" hide="true" /> <action idref="regenerate_renditions" hide="true" /> </action-group> </actions> </config>