(resend because of email problems) Hi Adrian, the mypage component is to show the information specific for an ofbiz user. Initailly for any userlogin without any required permissions. This was rather difficult because of the current permission system used througout the other components which blocked me from showing information.
Then i got the request of a customer if they could see the requests they send to us together with the current status. This customer however is also a user of ofbiz but has completely different requirements. >From another customer i have the request to be able to show information for vendors similar to resellers, they are also users of the system. Because of his i introduced the permission groups in the mypage component: MYPAGE_EMPLOYEE ; to show information important for an employee, MYPAGE_CUSTOMER for a customer etc. it can easily be extended for other groups. These permissiongoups contain the pernission of looking at the required screens in mypage and permissions needed for other components. so it is not more restrictive, but more specific for the different groups of ofbiz users. hope this helps, Regards, Hans On Thu, 2008-08-14 at 10:44 -0700, Adrian Crum wrote: > Hans, > > I might be mistaken, but I thought the MyPage component was intended to > be a "Home" page for OFBiz users. It seems to me you are making it more > and more restrictive - so that now OFBiz users can't use it unless they > have special permissions. > > Could you let me know what the ultimate purpose of the MyPage component is? > > -Adrian > > [EMAIL PROTECTED] wrote: > > Author: hansbak > > Date: Wed Aug 13 23:22:58 2008 > > New Revision: 685784 > > > > URL: http://svn.apache.org/viewvc?rev=685784&view=rev > > Log: > > corrected problem with decorator when a loginid has employee AND customer > > permissions > > > > Modified: > > ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml > > ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml > > > > Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=685784&r1=685783&r2=685784&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) > > +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Wed Aug 13 > > 23:22:58 2008 > > @@ -143,33 +143,44 @@ > > <screen name="main"> > > <section> > > <widgets> > > - <section> > > - <condition> > > - <if-has-permission > > permission="MYPAGE_EMPLOYEE" /> > > - </condition> > > - <widgets> > > - <include-screen > > name="mainEmployee" /> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-has-permission permission="MYPAGE_CUSTOMER" /> > > - </condition> > > - <widgets> > > - <include-screen name="mainCustomer" /> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <and> > > - <not><if-has-permission > > permission="MYPAGE_CUSTOMER"/></not> > > - <not><if-has-permission > > permission="MYPAGE_EMPLOYEE"/></not> > > - </and> > > - </condition> > > - <widgets> > > - <include-screen name="mainNoAccess" /> > > - </widgets> > > - </section> > > + <decorator-screen name="main-decorator" > > + location="${parameters.mainDecoratorLocation}"> > > + <decorator-section name="body"> > > + <section> > > + <condition> > > + > > <if-has-permission permission="MYPAGE_EMPLOYEE" /> > > + </condition> > > + <actions> > > + <set > > field="decorator" value="Y"/> > > + </actions> > > + <widgets> > > + <include-screen > > name="mainEmployee" /> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-has-permission > > permission="MYPAGE_CUSTOMER" /> > > + </condition> > > + <actions> > > + <set field="decorator" value="Y"/> > > + </actions> > > + <widgets> > > + <include-screen name="mainCustomer" /> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <and> > > + <not><if-has-permission > > permission="MYPAGE_CUSTOMER"/></not> > > + <not><if-has-permission > > permission="MYPAGE_EMPLOYEE"/></not> > > + </and> > > + </condition> > > + <widgets> > > + <include-screen name="mainNoAccess" /> > > + </widgets> > > + </section> > > + </decorator-section> > > + </decorator-screen> > > </widgets> > > </section> > > </screen> > > @@ -201,74 +212,70 @@ > > </entity-condition> > > </actions> > > <widgets> > > - <decorator-screen name="main-decorator" > > - location="${parameters.mainDecoratorLocation}"> > > - <decorator-section name="body"> > > - <section> > > - <condition> > > - <not><if-empty > > field-name="custRequests"/></not> > > - </condition> > > - <widgets> > > - <screenlet > > title="${uiLabelMap.IncomingCustRequests}" > > navigation-form-name="ListRequestList" > > > - <include-form name="ListRequestList" > > location="component://order/webapp/ordermgr/request/RequestForms.xml"/> > > - </screenlet> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-compare > > field-name="preferences.userPrefMap.myCommunications" > > - operator="equals" value="Y" /> > > - </condition> > > - <widgets> > > - <include-screen name="MyCommunications" > > - > > location="component://mypage/widget/MyPageScreens.xml"/> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-compare > > field-name="preferences.userPrefMap.otherCommunications" > > - operator="equals" value="Y" /> > > - </condition> > > - <widgets> > > - <include-screen name="OtherCommunications" > > - > > location="component://mypage/widget/MyPageScreens.xml" /> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-compare > > field-name="preferences.userPrefMap.myCompanyComms" > > - operator="equals" value="Y" /> > > - </condition> > > - <widgets> > > - <include-screen name="MyCompanyComms" > > - > > location="component://mypage/widget/MyPageScreens.xml" /> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-compare > > field-name="preferences.userPrefMap.myTasks" > > - operator="equals" value="Y" /> > > - </condition> > > - <widgets> > > - <include-screen name="MyTasks" > > - > > location="component://mypage/widget/MyPageScreens.xml" /> > > - </widgets> > > - </section> > > - <section> > > - <condition> > > - <if-compare > > field-name="preferences.userPrefMap.myTimesheet" > > - operator="equals" value="Y" /> > > - </condition> > > - <widgets> > > - <include-screen name="MyTimesheet" > > - > > location="component://mypage/widget/MyPageScreens.xml" /> > > - </widgets> > > - </section> > > - </decorator-section> > > - </decorator-screen> > > + <section> > > + <condition> > > + <not><if-empty field-name="custRequests"/></not> > > + </condition> > > + <widgets> > > + <screenlet > > title="${uiLabelMap.IncomingCustRequests}" > > navigation-form-name="ListRequestList" > > > + <include-form name="ListRequestList" > > location="component://order/webapp/ordermgr/request/RequestForms.xml"/> > > + </screenlet> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-compare > > field-name="preferences.userPrefMap.myCommunications" > > + operator="equals" value="Y" /> > > + </condition> > > + <widgets> > > + <include-screen name="MyCommunications" > > + > > location="component://mypage/widget/MyPageScreens.xml"/> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-compare > > field-name="preferences.userPrefMap.otherCommunications" > > + operator="equals" value="Y" /> > > + </condition> > > + <widgets> > > + <include-screen name="OtherCommunications" > > + > > location="component://mypage/widget/MyPageScreens.xml" /> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-compare > > field-name="preferences.userPrefMap.myCompanyComms" > > + operator="equals" value="Y" /> > > + </condition> > > + <widgets> > > + <include-screen name="MyCompanyComms" > > + > > location="component://mypage/widget/MyPageScreens.xml" /> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-compare > > field-name="preferences.userPrefMap.myTasks" > > + operator="equals" value="Y" /> > > + </condition> > > + <widgets> > > + <include-screen name="MyTasks" > > + > > location="component://mypage/widget/MyPageScreens.xml" /> > > + </widgets> > > + </section> > > + <section> > > + <condition> > > + <if-compare > > field-name="preferences.userPrefMap.myTimesheet" > > + operator="equals" value="Y" /> > > + </condition> > > + <widgets> > > + <include-screen name="MyTimesheet" > > + > > location="component://mypage/widget/MyPageScreens.xml" /> > > + </widgets> > > + </section> > > </widgets> > > </section> > > </screen> > > + > > <screen name="mainCustomer"> > > <section> > > <actions> > > @@ -278,39 +285,30 @@ > > </entity-and> > > </actions> > > <widgets> > > - <decorator-screen name="main-decorator" > > - location="${parameters.mainDecoratorLocation}"> > > - <decorator-section name="body"> > > - <screenlet title="${uiLabelMap.MyCustRequests}" > > navigation-form-name="ListRequestList" > > > - <include-form name="ListCustRequests" > > location="component://mypage/widget/MyPageForms.xml"/> > > - </screenlet> > > - </decorator-section> > > - </decorator-screen> > > + <screenlet title="${uiLabelMap.MyCustRequests}" > > navigation-form-name="ListRequestList" > > > + <include-form name="ListCustRequests" > > location="component://mypage/widget/MyPageForms.xml"/> > > + </screenlet> > > </widgets> > > </section> > > </screen> > > + > > <screen name="mainNoAccess"> > > <section> > > <widgets> > > - <decorator-screen name="main-decorator" > > - location="${parameters.mainDecoratorLocation}"> > > - <decorator-section name="body"> > > - <screenlet title="${uiLabelMap.CommonNoAccess}" > > navigation-form-name="ListRequestList" > > > - <container> > > - <label style="h1" > > text="${uiLabelMap.MyPageNoAccess1}"></label> > > - </container> > > - <container> > > - <label style="h2" > > text="${uiLabelMap.MyPageNoAccess2}"></label> > > - </container> > > - <container> > > - <label style="h3" > > text="${uiLabelMap.MyPageNoAccess3}"></label> > > - </container> > > - <container> > > - <label style="h3" > > text="${uiLabelMap.MyPageNoAccess4}"></label> > > - </container> > > - </screenlet> > > - </decorator-section> > > - </decorator-screen> > > + <screenlet title="${uiLabelMap.CommonNoAccess}" > > navigation-form-name="ListRequestList" > > > + <container> > > + <label style="h1" > > text="${uiLabelMap.MyPageNoAccess1}"></label> > > + </container> > > + <container> > > + <label style="h2" > > text="${uiLabelMap.MyPageNoAccess2}"></label> > > + </container> > > + <container> > > + <label style="h3" > > text="${uiLabelMap.MyPageNoAccess3}"></label> > > + </container> > > + <container> > > + <label style="h3" > > text="${uiLabelMap.MyPageNoAccess4}"></label> > > + </container> > > + </screenlet> > > </widgets> > > </section> > > </screen> > > > > Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=685784&r1=685783&r2=685784&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) > > +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Wed Aug 13 > > 23:22:58 2008 > > @@ -131,17 +131,17 @@ > > <service service-name="getProjectTask" > > result-map-name="taskResult"> > > <field-map field-name="taskId" env-name="workEffortId"/> > > </service> > > - <set field="task" from-field="taskResult.taskInfo"/> > > </row-actions> > > <field name="custRequestName"><hyperlink > > description="${custRequestName} [${custRequestId}]" > > target="ViewRequest?custRequestId=${custRequestId}"/></field> > > <field name="description" > > title="${uiLabelMap.CommonDescription}"><display/></field> > > <field name="createdDate" title="Date"><display > > type="date"/></field> > > <field name="statusId"><display-entity entity-name="StatusItem" > > description="${description}"/></field> > > - <field name="task.plannedStartDate"><display type="date"/></field> > > - <field name="task.plannedEndDate"><display type="date"/></field> > > - <field name="task.actualStartDate"><display type="date"/></field> > > - <field name="task.actualEndDate"><display type="date"/></field> > > - <field name="task.plannedHours"><display/></field> > > - <field name="task.actualHours"><display/></field> > > + <field name="currentStatusId" > > map-name="taskResult.taskInfo"><display-entity entity-name="StatusItem" > > key-field-name="statusId"/></field> > > + <field name="estimatedStartDate" > > map-name="taskResult.taskInfo"><display type="date"/></field> > > + <field name="estimatedCompletionDate" > > map-name="taskResult.taskInfo"><display type="date"/></field> > > + <field name="actualStartDate" > > map-name="taskResult.taskInfo"><display type="date"/></field> > > + <field name="actualCompletionDate" > > map-name="taskResult.taskInfo"><display type="date"/></field> > > + <field name="plannedHours" > > map-name="taskResult.taskInfo"><display/></field> > > + <field name="actualHours" > > map-name="taskResult.taskInfo"><display/></field> > > </form> > > </forms> > > \ No newline at end of file > > > > > >
