[ https://issues.apache.org/jira/browse/OFBIZ-4206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14213505#comment-14213505 ] Jacques Le Roux commented on OFBIZ-4206: ---------------------------------------- Pierre, I did not test all, but because of ListCurrentProjects.groovy, it seems to me that a better patch would be (with a better corresponding new fail label) {code} Index: specialpurpose/projectmgr/widget/CommonScreens.xml =================================================================== --- specialpurpose/projectmgr/widget/CommonScreens.xml (revision 1639842) +++ specialpurpose/projectmgr/widget/CommonScreens.xml (working copy) @@ -286,9 +286,23 @@ <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet title="${uiLabelMap.ProjectMgrProjectSummary}" navigation-form-name="ListCurrentProjects"> - <include-form name="ListCurrentProjects" location="component://projectmgr/widget/forms/ProjectForms.xml"/> - </screenlet> + <section> + <condition> + <and> + <if-has-permission permission="PROJECTMGR" action="_ADMIN"/> + <if-has-permission permission="PROJECTMGR" action="_ROLE_ADMIN"/> + <if-has-permission permission="PROJECTMGR" action="_ROLE_VIEW"/> + </and> + </condition> + <widgets> + <screenlet title="${uiLabelMap.ProjectMgrProjectSummary}" navigation-form-name="ListCurrentProjects"> + <include-form name="ListCurrentProjects" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </screenlet> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProjectMgrAdminViewPermissionError}</label> + </fail-widgets> + </section> </decorator-section> </decorator-screen> </widgets> {code} Could you test with roles and project with a a simple PROJECTUSER? > Project Manager throws error if project user is not assigned to every project > ----------------------------------------------------------------------------- > > Key: OFBIZ-4206 > URL: https://issues.apache.org/jira/browse/OFBIZ-4206 > Project: OFBiz > Issue Type: Bug > Components: specialpurpose/projectmgr > Affects Versions: Release 09.04, Release Branch 12.04, Release Branch 13.07, Trunk > Environment: RHEL 5.5 32 bit JDK > Reporter: Tolulope Aganga-Williams > Priority: Minor > Labels: patch > Attachments: ofbiz-trunk-projectmgr-commonscreens-20110722.patch > > Original Estimate: 24h > Remaining Estimate: 24h > > The project manager returns an error on the main page unless every user is added to every single project. It should return a list of just the projects the user is assigned to. > :ERROR MESSAGE: > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Error running Groovy script at location [component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy]: org.ofbiz.service.ServiceAuthException: You have no access to the project#: 10040 (Error running Groovy script at location [component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy]: org.ofbiz.service.ServiceAuthException: You have no access to the project#: 10040) > It defeats the point. -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |