You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2008/03/20 06:08:00 UTC

svn commit: r639160 - in /ofbiz/trunk/framework/webtools: data/ webapp/webtools/ webapp/webtools/entity/ webapp/webtools/includes/ webapp/webtools/service/ widget/

Author: jonesde
Date: Wed Mar 19 22:07:59 2008
New Revision: 639160

URL: http://svn.apache.org/viewvc?rev=639160&view=rev
Log:
Added ARTIFACT_INFO_VIEW permission, added links to artifact info in entity and service references

Modified:
    ofbiz/trunk/framework/webtools/data/WebtoolsSecurityData.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
    ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml

Modified: ofbiz/trunk/framework/webtools/data/WebtoolsSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/data/WebtoolsSecurityData.xml?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/data/WebtoolsSecurityData.xml (original)
+++ ofbiz/trunk/framework/webtools/data/WebtoolsSecurityData.xml Wed Mar 19 22:07:59 2008
@@ -30,6 +30,12 @@
     <SecurityGroupPermission groupId="FLEXADMIN" permissionId="SERVER_STATS_VIEW"/>
     <SecurityGroupPermission groupId="VIEWADMIN" permissionId="SERVER_STATS_VIEW"/>
 
+    <!-- Artifact Info security -->
+    <SecurityPermission description="View the Artifact Info pages." permissionId="ARTIFACT_INFO_VIEW"/>
+    <SecurityGroupPermission groupId="FULLADMIN" permissionId="ARTIFACT_INFO_VIEW"/>
+    <SecurityGroupPermission groupId="FLEXADMIN" permissionId="ARTIFACT_INFO_VIEW"/>
+    <SecurityGroupPermission groupId="VIEWADMIN" permissionId="ARTIFACT_INFO_VIEW"/>
+    
     <!-- Data File Maintenance security -->
     <SecurityPermission description="Use the Data File Maintenance pages." permissionId="DATAFILE_MAINT"/>
     <SecurityGroupPermission groupId="FULLADMIN" permissionId="DATAFILE_MAINT"/>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl Wed Mar 19 22:07:59 2008
@@ -66,6 +66,10 @@
                                     <#assign encodeURL = response.encodeURL(controlPath + "/FindGeneric?entityName=" + entity.entityName + "&find=true&VIEW_SIZE=50&VIEW_INDEX=0")>
                                     <a target='main' href="${encodeURL}">[${uiLabelMap.WebtoolsViewData}]</a>
                                 </#if>
+                                <#if !forstatic>
+                                    <#assign encodeURL = response.encodeURL(controlPath + "/ArtifactInfo?name=" + entity.entityName + "&type=entity")>
+                                    <a target='main' href="${encodeURL}">[Artifact Info]</a>
+                                </#if>
                             </div>
                             <#if entity.description?has_content && 
                                  !entity.description.equalsIgnoreCase("NONE") && 

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl Wed Mar 19 22:07:59 2008
@@ -31,6 +31,9 @@
       <li<#if selected == "jobs"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsJobList}</a></li>
       <li<#if selected == "cache"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsCacheMaintenance}</a></li>
       <li<#if selected == "logging"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsLogging}</a></li>
+      <#if security.hasPermission("ARTIFACT_INFO_VIEW", session)>
+        <li<#if selected == "ArtifactInfo"> class="selected"</#if>><a href="<@o...@ofbizUrl>">Artifact Info</a></li>
+      </#if>
       <li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>
       <li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Wed Mar 19 22:07:59 2008
@@ -67,6 +67,12 @@
         <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsAdjustDebuggingLevels}</a></li>
         <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsViewLog}</a></li>
         <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsViewComponents}</a></li>
+        <#if security.hasPermission("ARTIFACT_INFO_VIEW", session)>
+          <li><h3>General Artifact Info Tools</h3></li>
+          <li><a href="<@o...@ofbizUrl>" target="_blank">Artifact Info</a></li>
+          <li><a href="<@o...@ofbizUrl>" target="_blank">${uiLabelMap.WebtoolsEntityReference} - Interactive</a></li>
+          <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsServiceReference}</a></li>
+        </#if>
         <#if security.hasPermission("ENTITY_MAINT", session)>
           <li><h3>${uiLabelMap.WebtoolsEntityEngineTools}</h3></li>
           <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsEntityDataMaintenance}</a></li>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl Wed Mar 19 22:07:59 2008
@@ -67,7 +67,8 @@
             <td><a href='<@o...@ofbizUrl>'>${selectedServiceMap.location}</a></td>
           </tr>
           <tr>
-            <td colspan="2">&nbsp;</td>
+            <td class="label">Artifact Info</td>
+            <td><a href='<@o...@ofbizUrl>'>Artifact Info</a></td>
             <td class="label">${uiLabelMap.WebtoolsDefaultEntityName}</td>
             <td><a href='<@o...@ofbizUrl>'>${selectedServiceMap.defaultEntityName}</a></td>
           </tr>

Modified: ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml?rev=639160&r1=639159&r2=639160&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml Wed Mar 19 22:07:59 2008
@@ -22,9 +22,12 @@
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
     <screen name="ArtifactInfo">
         <section>
+            <condition>
+                <if-has-permission permission="ARTIFACT_INFO_VIEW"/>
+            </condition>
             <actions>
                 <set field="titleProperty" value="WebtoolsServiceReference"/>
-                <set field="appButtonItem" value="service"/>
+                <set field="headerItem" value="ArtifactInfo"/>
                 <script location="component://webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh"/>
             </actions>
             <widgets>
@@ -34,6 +37,9 @@
                     </decorator-section>
                 </decorator-screen>
             </widgets>
+            <fail-widgets>
+                <label style="h3">Cannot view Artifact Info pages without ARTIFACT_INFO_VIEW permission.</label>
+            </fail-widgets>
         </section>
     </screen>
 </screens>