Author: chathura
Date: Tue Jan 29 02:33:53 2008
New Revision: 13131

Log:


Fixed some UI jiras



Modified:
   branches/registry/1_0/modules/webapps/src/main/webapp/admin/people.jsp
   branches/registry/1_0/modules/webapps/src/main/webapp/admin/user.jsp

Modified: branches/registry/1_0/modules/webapps/src/main/webapp/admin/people.jsp
==============================================================================
--- branches/registry/1_0/modules/webapps/src/main/webapp/admin/people.jsp      
(original)
+++ branches/registry/1_0/modules/webapps/src/main/webapp/admin/people.jsp      
Tue Jan 29 02:33:53 2008
@@ -3,6 +3,7 @@
 <%@ page import="java.util.List" %>
 <%@ page import="java.util.Iterator" %>
 <%@ page import="java.util.Map" %>
+<%@ page import="org.wso2.registry.RegistryConstants" %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd";>
@@ -150,8 +151,16 @@
                                <td><%=friendlyName%></td>
                                
                                <td align="left">
-                                   <% if 
(userManagementAction.isDeleteAllowed()) { %><a 
href="/wso2registry/system/removeUser?user=<%=regUser%>" title="Delete" 
style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif" 
border="0" /></a><% } %>
-                               </td>
+                        <%
+                            if (!RegistryConstants.SYSTEM_USER.equals(regUser) 
&&
+                                    
!RegistryConstants.ADMIN_USER.equals(regUser) &&
+                                    
!RegistryConstants.ANONYMOUS_USER.equals(regUser)) {
+                        %>
+                        <% if (userManagementAction.isDeleteAllowed()) { %><a 
href="/wso2registry/system/removeUser?user=<%=regUser%>" title="Delete" 
style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif" 
border="0" /></a><% } %>
+                        <%
+                            }
+                        %>
+                    </td>
                            </tr>
                        
                            <% } %>
@@ -240,8 +249,16 @@
                                    <tr>
                                        <td><%=role%></td>
                                        <td>
-                                           <% if 
(userManagementAction.isDeleteAllowed()) { %><a 
href="/wso2registry/system/removeRole?role=<%=role%>" title="Delete" 
style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif" 
border="0" /></a><% } %>
-                                       </td>
+                            <%
+                                if 
(!RegistryConstants.EVERYONE_ROLE.equals(role) &&
+                                        
!RegistryConstants.ADMIN_ROLE.equals(role) &&
+                                        
!RegistryConstants.GUESTS_ROLE.equals(role)) {
+                            %>
+                            <% if (userManagementAction.isDeleteAllowed()) { 
%><a href="/wso2registry/system/removeRole?role=<%=role%>" title="Delete" 
style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif" 
border="0" /></a><% } %>
+                            <%
+                                }
+                            %>
+                        </td>
                                    </tr>
                                
                                    <% } %>    

Modified: branches/registry/1_0/modules/webapps/src/main/webapp/admin/user.jsp
==============================================================================
--- branches/registry/1_0/modules/webapps/src/main/webapp/admin/user.jsp        
(original)
+++ branches/registry/1_0/modules/webapps/src/main/webapp/admin/user.jsp        
Tue Jan 29 02:33:53 2008
@@ -1,6 +1,7 @@
 <%@ page import="org.wso2.registry.web.actions.UserDetailsAction" %>
 <%@ page import="org.wso2.registry.web.UIConstants" %>
 <%@ page import="java.util.Iterator" %>
+<%@ page import="org.wso2.registry.RegistryConstants" %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
 <head>
@@ -130,9 +131,11 @@
                 Iterator iRoles = userDetailsAction.getAllRoles().iterator();
                 while (iRoles.hasNext()) {
                     String roleName = (String) iRoles.next();
+
+                    if (!RegistryConstants.EVERYONE_ROLE.equals(roleName)) {
             %>
             <option value="<%=roleName%>"><%=roleName%></option>
-            <% } %>
+            <% }} %>
         </select>
         <input type="submit" class="button" value="Add"/>
     </form>
@@ -148,7 +151,7 @@
             while (iUserRoles.hasNext()) {
                 String userRole = (String) iUserRoles.next();
         %>
-        <tr><td><%=userRole%></td><td><a 
href="/wso2registry/system/removeUserFromRole?user=<%=userDetailsAction.getUserName()%>&role=<%=userRole%>"><img
 src="/wso2registry/admin/images/icon-trash.gif" border="0" /></a></td></tr>
+        <tr><td><%=userRole%></td><td><% if 
(!RegistryConstants.EVERYONE_ROLE.equals(userRole)) { %><a 
href="/wso2registry/system/removeUserFromRole?user=<%=userDetailsAction.getUserName()%>&role=<%=userRole%>"><img
 src="/wso2registry/admin/images/icon-trash.gif" border="0" /></a><% } 
%></td></tr>
         <% } %>
 
     </table>

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

Reply via email to