summaryrefslogtreecommitdiff
path: root/java/broker-core/src
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-07-21 10:49:50 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-07-21 10:49:50 +0000
commit1e9c205d1b5b2acfec619844ba3cf50164bc3d79 (patch)
treeb47478c8530504bde321b531ba725d9b8d2ceccd /java/broker-core/src
parent2bf9fcba59a576861dae424ee5ddfe8fae0a1af9 (diff)
downloadqpid-python-1e9c205d1b5b2acfec619844ba3cf50164bc3d79.tar.gz
QPID-4520 : The deletion of autodelete queue due to autodeletion should not require ACL rights for deleting the queue
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1612237 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker-core/src')
-rw-r--r--java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
index cb3b5effd0..f2ac1a7cdc 100644
--- a/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
+++ b/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
@@ -430,7 +430,16 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
@Override
public void performAction(final Deletable object)
{
- getVirtualHost().removeQueue(AbstractQueue.this);
+ Subject.doAs(SecurityManager.getSubjectWithAddedSystemRights(),
+ new PrivilegedAction<Void>()
+ {
+ @Override
+ public Void run()
+ {
+ getVirtualHost().removeQueue(AbstractQueue.this);
+ return null;
+ }
+ });
}
};
@@ -742,7 +751,16 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
_logger.info("Auto-deleting queue:" + this);
}
- getVirtualHost().removeQueue(this);
+ Subject.doAs(SecurityManager.getSubjectWithAddedSystemRights(), new PrivilegedAction<Object>()
+ {
+ @Override
+ public Object run()
+ {
+ getVirtualHost().removeQueue(AbstractQueue.this);
+ return null;
+ }
+ });
+
// we need to manually fire the event to the removed consumer (which was the last one left for this
// queue. This is because the delete method uses the consumer set which has just been cleared