From bcdbac83b04e51d7d7a2c7ae736b4892f21557e2 Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Wed, 3 Apr 2013 11:50:49 +0000 Subject: QPID-4678: Update management operations to invoke ACL checks only once git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1463934 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/server/model/adapter/AbstractAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java index 05977a22af..20929a337a 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java @@ -92,9 +92,9 @@ abstract class AbstractAdapter implements ConfiguredObject 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 implements ConfiguredObject 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 implements ConfiguredObject @Override public C createChild(Class childClass, Map 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 implements ConfiguredObject @Override public void setAttributes(final Map attributes) throws IllegalStateException, AccessControlException, IllegalArgumentException { - authoriseSetAttributes(attributes); if (getTaskExecutor().isTaskExecutorThread()) { + authoriseSetAttributes(attributes); changeAttributes(attributes); } else -- cgit v1.2.1