Author: orudyy
Date: Wed Apr 3 11:50:49 2013
New Revision: 1463934
URL: http://svn.apache.org/r1463934
Log:
QPID-4678: Update management operations to invoke ACL checks only once
Modified:
qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
Modified:
qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java?rev=1463934&r1=1463933&r2=1463934&view=diff
==============================================================================
---
qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
(original)
+++
qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
Wed Apr 3 11:50:49 2013
@@ -92,9 +92,9 @@ abstract class AbstractAdapter implement
public final State setDesiredState(final State currentState, final State
desiredState)
throws IllegalStateTransitionException, AccessControlException
{
- authoriseSetDesiredState(currentState, desiredState);
if (_taskExecutor.isTaskExecutorThread())
{
+ authoriseSetDesiredState(currentState, desiredState);
if (setState(currentState, desiredState))
{
notifyStateChanged(currentState, desiredState);
@@ -227,9 +227,9 @@ abstract class AbstractAdapter implement
public Object setAttribute(final String name, final Object expected, final
Object desired)
throws IllegalStateException, AccessControlException,
IllegalArgumentException
{
- authoriseSetAttribute(name, expected, desired);
if (_taskExecutor.isTaskExecutorThread())
{
+ authoriseSetAttribute(name, expected, desired);
if (changeAttribute(name, expected, desired))
{
attributeSet(name, expected, desired);
@@ -306,9 +306,9 @@ abstract class AbstractAdapter implement
@Override
public <C extends ConfiguredObject> C createChild(Class<C> childClass,
Map<String, Object> attributes, ConfiguredObject... otherParents)
{
- authoriseCreateChild(childClass, attributes, otherParents);
if (_taskExecutor.isTaskExecutorThread())
{
+ authoriseCreateChild(childClass, attributes, otherParents);
C child = addChild(childClass, attributes, otherParents);
if (child != null)
{
@@ -336,9 +336,9 @@ abstract class AbstractAdapter implement
@Override
public void setAttributes(final Map<String, Object> attributes) throws
IllegalStateException, AccessControlException, IllegalArgumentException
{
- authoriseSetAttributes(attributes);
if (getTaskExecutor().isTaskExecutorThread())
{
+ authoriseSetAttributes(attributes);
changeAttributes(attributes);
}
else
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]