qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhupend...@apache.org
Subject svn commit: r531524 - in /incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server: management/MBeanInvocationHandlerImpl.java security/access/UserManagement.java
Date Mon, 23 Apr 2007 16:28:02 GMT
Author: bhupendrab
Date: Mon Apr 23 09:28:00 2007
New Revision: 531524

URL: http://svn.apache.org/viewvc?view=rev&rev=531524
Log:
QPID-445

Modified:
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java?view=diff&rev=531524&r1=531523&r2=531524
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
Mon Apr 23 09:28:00 2007
@@ -149,15 +149,8 @@
     {
         if (args[0] instanceof ObjectName)
         {
-            if (args[0] instanceof ObjectName)
-            {
-                ObjectName object = (ObjectName) args[0];
-                return UserManagement.TYPE.equals(object.getKeyProperty("type"));
-            }
-            else
-            {
-                return false;
-            }
+            ObjectName object = (ObjectName) args[0];
+            return UserManagement.TYPE.equals(object.getKeyProperty("type"));
         }
 
         return false;
@@ -200,16 +193,16 @@
     private boolean isReadOnlyMethod(Method method, Object[] args)
     {
         String methodName = method.getName();
-        if (methodName.equals("queryMBeans") ||
-            methodName.equals("getDefaultDomain") ||
-            methodName.equals("getMBeanInfo") ||
-            methodName.equals("getAttribute") ||
-            methodName.equals("getAttributes"))
+        if (methodName.startsWith("query") || methodName.startsWith("get"))
         {
             return true;
         }
+        else if (methodName.startsWith("set"))
+        {
+            return false;
+        }
 
-        if (args[0] instanceof ObjectName)
+        if ((args[0] instanceof ObjectName) && (methodName.equals("invoke")))
         {
             String mbeanMethod = (args.length > 1) ? (String) args[1] : null;
             if (mbeanMethod == null)

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java?view=diff&rev=531524&r1=531523&r2=531524
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java
Mon Apr 23 09:28:00 2007
@@ -63,7 +63,7 @@
                     impact = MBeanOperationInfo.ACTION)
     boolean setRights(@MBeanOperationParameter(name = "username", description = "Username")String
username,
                       @MBeanOperationParameter(name = "read", description = "Administration
read")boolean read,
-                      @MBeanOperationParameter(name = "write", description = "Administration
write")boolean write,
+                      @MBeanOperationParameter(name = "readAndWrite", description = "Administration
write")boolean write,
                       @MBeanOperationParameter(name = "admin", description = "Administration
rights")boolean admin);
 
     /**
@@ -82,7 +82,7 @@
     boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String
username,
                        @MBeanOperationParameter(name = "password", description = "Password")char[]
password,
                        @MBeanOperationParameter(name = "read", description = "Administration
read")boolean read,
-                       @MBeanOperationParameter(name = "write", description = "Administration
write")boolean write,
+                       @MBeanOperationParameter(name = "readAndWrite", description = "Administration
write")boolean write,
                        @MBeanOperationParameter(name = "admin", description = "Administration
rights")boolean admin);
 
     /**



Mime
View raw message