show toplevel info of the project, if the customer has a client role in the project

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@706506 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2008-10-21 04:01:38 +00:00
parent 7fb7c028da
commit 6d79a50e21
7 changed files with 101 additions and 35 deletions
+2 -1
View File
@@ -47,8 +47,9 @@ under the License.
<SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PARTYMGR_CME_UPDATE"/>
<SecurityPermission permissionId="MYPAGE_CUSTOMER" description="Use the customer screens in mypage."/>
<SecurityGroup description="Customer user of mypage, Limited access to own custRequests" groupId="MYPAGE_CUSTOMER"/>
<SecurityGroup description="Customer user of mypage, Limited access to own custRequests, and project" groupId="MYPAGE_CUSTOMER"/>
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME-NOTE_CREATE"/><!-- allow customer to read/write internal notes -->
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="MYPAGE_CUSTOMER"/>
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME_UPDATE"/>
<SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PROJECTMGR_ROLE_VIEW"/>
</entity-engine-xml>
@@ -214,6 +214,10 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="ListInvoices"/>
</request-map>
<request-map uri="listProjects">
<security https="true" auth="true"/>
<response name="success" type="view" value="ListProjects"/>
</request-map>
<!-- EMAIL COMMUNICATIONS -->
<request-map uri="NewCommunicationEvents">
@@ -270,6 +274,7 @@
<view-map name="ViewRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#ViewRequest"/>
<view-map name="EditRequest" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditRequest"/>
<view-map name="ListInvoices" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListInvoices"/>
<view-map name="ListProjects" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListProjects"/>
<view-map name="custPreferences" type="screen" page="component://mypage/widget/CommonScreens.xml#custPreferences"/>
<view-map name="EditCommunicationEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditCommunicationEvent"/>
<view-map name="addAttachmentEmail" type="screen" page="component://mypage/widget/MyPageScreens.xml#addAttachmentEmail"/>
+9
View File
@@ -87,6 +87,15 @@ under the License.
</condition>
<link target="listInvoices"/>
</menu-item>
<menu-item name="projects" title="${uiLabelMap.ProjectMgrProjects}">
<condition>
<and>
<not><if-empty field-name="userLogin"/></not>
<if-has-permission permission="MYPAGE_CUSTOMER"/>
</and>
</condition>
<link target="listProjects"/>
</menu-item>
<menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed">
<condition><not><if-empty field-name="userLogin"/></not></condition>
<link target="logout"/>
+73 -12
View File
@@ -498,18 +498,14 @@ under the License.
</entity-condition>
</actions>
<widgets>
<section>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleListInvoices}" navigation-form-name="ListInvoices">
<include-form name="ListInvoices" location="component://mypage/widget/MyPageForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleListInvoices}" navigation-form-name="ListInvoices">
<include-form name="ListInvoices" location="component://mypage/widget/MyPageForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CreateCustRequestNotification">
@@ -647,4 +643,69 @@ under the License.
</widgets>
</section>
</screen>
<screen name="ListProjects">
<section>
<actions>
<set field="headerItem" value="projects"/>
<set field="layoutSettings.javaScripts[]" value="/images/jsgantt.js" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/images/jsgantt.css" global="true"/>
<entity-condition list-name="projects" entity-name="WorkEffortPartyAssignment" filter-by-date="true">
<condition-list combine="and">
<condition-expr field-name="partyId" env-name="userLogin.partyId"/>
<condition-list combine="or">
<condition-expr field-name="roleTypeId" value="CLIENT_MANAGER"/>
<condition-expr field-name="roleTypeId" value="CLIENT_ANALYST"/>
<condition-expr field-name="roleTypeId" value="CLIENT_BILLING"/>
</condition-list>
</condition-list>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<iterate-section entry-name="project" list-name="projects">
<section>
<actions>
<set field="projectId" from-field="project.workEffortId"/>
<set field="parameters.projectId" from-field="project.workEffortId"/>
<script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy"/>
<service service-name="getProject" result-map-name="result">
<field-map field-name="projectId" env-name="projectId"/>
</service>
<set field="project" from-field="result.projectInfo"/>
</actions>
<widgets>
<label style="h1" text="${uiLabelMap.ProjectMgrProjectCurrent}: ${project.projectName}[${project.projectId}]"/>
<container style="lefthalf">
<screenlet title="${uiLabelMap.PageTitleProjectInformation}">
<include-form name="ProjectInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
</screenlet>
<include-screen name="PhasesInfo" location="component://projectmgr/widget/ProjectScreens.xml"/>
</container>
<container style="righthalf">
<include-screen name="TasksInfo" location="component://projectmgr/widget/ProjectScreens.xml"/>
</container>
<container style="clear"/>
<label text="====${parameters.projectId}"></label>
<screenlet title="${uiLabelMap.PageTitleProjectGanttChart}">
<platform-specific>
<html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
</platform-specific>
</screenlet>
</widgets>
</section>
</iterate-section>
<section>
<condition>
<if-empty field-name="projects"/>
</condition>
<widgets>
<label style="h2" text="no projects found"></label>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>
@@ -101,9 +101,9 @@
<!-- PHASE -->
<if-compare field="sec_object" value="PHASE" operator="equals">
<!--log level="info" message="======ProjectMGR Security===== action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.projectId} resourceDescription: ${parameters.resourceDescription}"/-->
<set field="projectId" from-field="parameters.projectId"/>
<set field="partyId" from-field="parameters.userLogin.partyId"/>
<!--log level="info" message="======ProjectMGR Security===== action: ${parameters.mainAction} object: ${sec_object} projectId: ${projectId} resourceDescription: ${parameters.resourceDescription}"/-->
<call-simple-method method-name="checkProjectMembership"/>
<if>
<condition>
@@ -148,8 +148,8 @@
<set field="phaseId" from-field="parameters.workEffortParentId"/>
</if-empty>
<set field="partyId" from-field="parameters.userLogin.partyId"/>
<!--call-simple-method method-name="checkProjectMembership"/-->
<!-- log level="info" message="======ProjectMGR Security===== action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.taskId} PhaseId: ${parameters.workEffortParentId} resourceDescription: ${parameters.resourceDescription} isMember: ${isMember}"/-->
<call-simple-method method-name="checkProjectMembership"></call-simple-method>
<!--log level="info" message="======ProjectMGR Security===== action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.taskId} PhaseId: ${parameters.workEffortParentId} resourceDescription: ${parameters.resourceDescription} isMember: ${isMember}"/-->
<entity-and list-name="custRequests" entity-name="WorkEffortCustRequestView">
<field-map field-name="workEffortId" env-name="taskId"/>
</entity-and>
@@ -278,7 +278,7 @@
<set field="timesheetId" from-field="timesheet.timesheetId"/>
<set field="taskId" from-field="parameters.workEffortId"/>
<set field="partyId" from-field="timesheet.partyId"/>
<!-- call-simple-method method-name="checkProjectMembership"/-->
<call-simple-method method-name="checkProjectMembership"/>
<!-- log level="info" message="======ProjectMGR Security===== action: ${mainAction} object: ${sec_object} timesheetId: ${timesheetId} from partyId: ${partyId} workEffortId: ${parameters.workEffortId} resourceDescription: ${parameters.resourceDescription}"/-->
<if>
<condition>
+3 -2
View File
@@ -21,12 +21,13 @@ under the License.
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
<!-- temporary disabled because it caused a db lock with the checkProjectMembership in projectpermission services -->
<!-- check if testing or validation of completed tasks in this project is required, if so, assign the responsible party to the task -->
<eca service="updateTaskAssigment" event="invoke">
<!--eca service="updateTaskAssigment" event="invoke">
<condition field-name="statusId" operator="equals" value="PAS_COMPLETED"/>
<condition field-name="roleTypeId" operator="not-equals" value="PROVIDER_TESTER"/>
<condition field-name="roleTypeId" operator="not-equals" value="PROVIDER_VALIDATOR"/>
<action service="addValidationPartiesToTask" mode="sync"/>
</eca>
</eca-->
</service-eca>
+5 -16
View File
@@ -509,22 +509,11 @@ under the License.
<label text="${project}"></label>
<decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
<container style="h3">
<label text="${uiLabelMap.PageTitleProjectGanttChart}"/>
</container>
</container>
<container style="screenlet-body">
<section>
<widgets>
<platform-specific>
<html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
</platform-specific>
</widgets>
</section>
</container>
</container>
<screenlet title="${uiLabelMap.PageTitleProjectGanttChart}">
<platform-specific>
<html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
</platform-specific>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>