cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] cassandra git commit: Revert "Defer initialization of default RoleManager until IAuthenticator is set"
Date Wed, 02 Sep 2015 14:36:22 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 45dd5d178 -> f7644f265
  refs/heads/cassandra-3.0 53a177a91 -> 796b0f26a
  refs/heads/trunk 79628dd70 -> f66730d61


Revert "Defer initialization of default RoleManager until IAuthenticator is set"

This reverts commit 0d2f4038fc2564c695d0d8c4b1ad523ec1afaceb.


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f7644f26
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f7644f26
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f7644f26

Branch: refs/heads/cassandra-2.2
Commit: f7644f265aec236d1daf825a7d55e9695c06b73d
Parents: 45dd5d1
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Sep 2 09:35:45 2015 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Sep 2 09:35:45 2015 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/config/DatabaseDescriptor.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7644f26/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 9cf3959..b7e3eaa 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -87,9 +87,7 @@ public class DatabaseDescriptor
 
     private static IAuthenticator authenticator = new AllowAllAuthenticator();
     private static IAuthorizer authorizer = new AllowAllAuthorizer();
-    // Don't initialize the role manager until applying config. The options supported by
CassandraRoleManager
-    // depend on the configured IAuthenticator, so defer creating it until that's been set.
-    private static IRoleManager roleManager;
+    private static IRoleManager roleManager = new CassandraRoleManager();
 
     private static IRequestScheduler requestScheduler;
     private static RequestSchedulerId requestSchedulerId;
@@ -325,9 +323,8 @@ public class DatabaseDescriptor
         if (authenticator instanceof AllowAllAuthenticator && !(authorizer instanceof
AllowAllAuthorizer))
             throw new ConfigurationException("AllowAllAuthenticator can't be used with "
+  conf.authorizer, false);
 
-        roleManager = conf.role_manager == null
-                    ? new CassandraRoleManager()
-                    : FBUtilities.newRoleManager(conf.role_manager);
+        if (conf.role_manager != null)
+            roleManager = FBUtilities.newRoleManager(conf.role_manager);
 
         if (authenticator instanceof PasswordAuthenticator && !(roleManager instanceof
CassandraRoleManager))
             throw new ConfigurationException("CassandraRoleManager must be used with PasswordAuthenticator",
false);


Mime
View raw message