Author: chathura
Date: Sun Jan 13 23:24:43 2008
New Revision: 12189

Log:


Restricted property manipulation options in the UI according the permissions of 
the logged in user.



Modified:
   
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
   (original)
+++ 
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
   Sun Jan 13 23:24:43 2008
@@ -45,10 +45,11 @@
        <tr id="propViewPanel_<%=i%>">
                <td><%=name%></td>
                <td><%=value%></td>
-               <td>    
-                       <a href="#" 
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
 title="Edit" border="0" align="top" 
src="/wso2registry/admin/images/icon-edit.gif" /></a>
+               <td>
+            <% if (details.isPutAllowed()) { %>
+            <a href="#" 
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
 title="Edit" border="0" align="top" 
src="/wso2registry/admin/images/icon-edit.gif" /></a>
                        <a href="#" onclick="removeProperty('<%=name%>')" 
style="margin-left:5px;"><img title="Remove" style="margin-top:3px;" border="0" 
align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
-                       
+                       <% } %>
                </td>
        </tr>
             

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
Sun Jan 13 23:24:43 2008
@@ -114,9 +114,11 @@
                        Properties
                </th>
                <td>
-                       <a onclick="showHideCommon('propertiesAddDiv');" 
href="#">
+                <% if (details.isPutAllowed()) { %>
+                <a onclick="showHideCommon('propertiesAddDiv');" href="#">
                                <img border="0" title="Add New Properties" 
style="margin-top: -10px;" valign="top" 
src="/wso2registry/admin/images/universal-add.gif"/>
-                       </a>
+                <% } %>
+            </a>
                </td>
                <td id="propertiesAddDiv" style="display:none; 
padding-left:10px;">
                        <form>
@@ -162,10 +164,11 @@
        <tr id="propViewPanel_<%=i%>">
                <td><%=name%></td>
                <td><%=value%></td>
-               <td>    
-                       <a href="#" 
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
 title="Edit" border="0" align="top" 
src="/wso2registry/admin/images/icon-edit.gif" /></a>
+               <td>
+            <% if (details.isPutAllowed()) { %>
+            <a href="#" 
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
 title="Edit" border="0" align="top" 
src="/wso2registry/admin/images/icon-edit.gif" /></a>
                        <a href="#" onclick="removeProperty('<%=name%>')" 
style="margin-left:5px;"><img title="Remove" style="margin-top:3px;" border="0" 
align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
-                       
+                       <% } %>
                </td>
        </tr>
             

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to