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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

jonesde
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="<@ofbizUrl>jobList</@ofbizUrl>">${uiLabelMap.WebtoolsJobList}</a></li>
       <li<#if selected == "cache"> class="selected"</#if>><a href="<@ofbizUrl>FindUtilCache</@ofbizUrl>">${uiLabelMap.WebtoolsCacheMaintenance}</a></li>
       <li<#if selected == "logging"> class="selected"</#if>><a href="<@ofbizUrl>LogView</@ofbizUrl>">${uiLabelMap.WebtoolsLogging}</a></li>
+      <#if security.hasPermission("ARTIFACT_INFO_VIEW", session)>
+        <li<#if selected == "ArtifactInfo"> class="selected"</#if>><a href="<@ofbizUrl>ArtifactInfo</@ofbizUrl>">Artifact Info</a></li>
+      </#if>
       <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>
       <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@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="<@ofbizUrl>LogConfiguration</@ofbizUrl>">${uiLabelMap.WebtoolsAdjustDebuggingLevels}</a></li>
         <li><a href="<@ofbizUrl>LogView</@ofbizUrl>">${uiLabelMap.WebtoolsViewLog}</a></li>
         <li><a href="<@ofbizUrl>ViewComponents</@ofbizUrl>">${uiLabelMap.WebtoolsViewComponents}</a></li>
+        <#if security.hasPermission("ARTIFACT_INFO_VIEW", session)>
+          <li><h3>General Artifact Info Tools</h3></li>
+          <li><a href="<@ofbizUrl>ArtifactInfo</@ofbizUrl>" target="_blank">Artifact Info</a></li>
+          <li><a href="<@ofbizUrl>entityref</@ofbizUrl>" target="_blank">${uiLabelMap.WebtoolsEntityReference} - Interactive</a></li>
+          <li><a href="<@ofbizUrl>availableServices</@ofbizUrl>">${uiLabelMap.WebtoolsServiceReference}</a></li>
+        </#if>
         <#if security.hasPermission("ENTITY_MAINT", session)>
           <li><h3>${uiLabelMap.WebtoolsEntityEngineTools}</h3></li>
           <li><a href="<@ofbizUrl>entitymaint</@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='<@ofbizUrl>${url}?constraint=location@${selectedServiceMap.location}</@ofbizUrl>'>${selectedServiceMap.location}</a></td>
           </tr>
           <tr>
-            <td colspan="2">&nbsp;</td>
+            <td class="label">Artifact Info</td>
+            <td><a href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&type=service</@ofbizUrl>'>Artifact Info</a></td>
             <td class="label">${uiLabelMap.WebtoolsDefaultEntityName}</td>
             <td><a href='<@ofbizUrl>${url}?constraint=default_entity_name@${selectedServiceMap.defaultEntityName}</@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>