Clean up permissions when a UDA is dropped Patch by Sam Tunnicliffe; reviewed by Joel Knighton for CASSANDRA-12720
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eed687d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eed687d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eed687d Branch: refs/heads/trunk Commit: 4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e Parents: 7232d72 Author: Sam Tunnicliffe <s...@beobal.com> Authored: Wed Sep 28 16:17:25 2016 +0100 Committer: Sam Tunnicliffe <s...@beobal.com> Committed: Thu Oct 13 17:46:14 2016 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++++++ 2 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 682f12b..41e3f94 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-11117) * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) * Fix merkle tree depth calculation (CASSANDRA-12580) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/src/java/org/apache/cassandra/auth/AuthMigrationListener.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java index fe34329..64fe7c6 100644 --- a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java +++ b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java @@ -44,4 +44,10 @@ public class AuthMigrationListener extends MigrationListener DatabaseDescriptor.getAuthorizer() .revokeAllOn(FunctionResource.function(ksName, functionName, argTypes)); } + + public void onDropAggregate(String ksName, String aggregateName, List<AbstractType<?>> argTypes) + { + DatabaseDescriptor.getAuthorizer() + .revokeAllOn(FunctionResource.function(ksName, aggregateName, argTypes)); + } }