SSO central related fixes to user creation and superuser login logic.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/27751490 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/27751490 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/27751490 Branch: refs/heads/USERGRID-628 Commit: 277514902f18caf36c2a65b3803c8ecc60118e58 Parents: b2fb0c3 Author: Dave Johnson <dmjohn...@apigee.com> Authored: Wed Apr 29 10:00:03 2015 -0400 Committer: Dave Johnson <dmjohn...@apigee.com> Committed: Wed Apr 29 10:00:03 2015 -0400 ---------------------------------------------------------------------- .../apache/usergrid/rest/management/ManagementResource.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/27751490/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java ---------------------------------------------------------------------- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java index bcd6f3d..fcbf49c 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java @@ -604,7 +604,7 @@ public class ManagementResource extends AbstractContextResource { // haven't created user yet so do that now OrganizationOwnerInfo ownerOrgInfo = management.createOwnerAndOrganization( - orgName, username, name, email, dummyPassword, true, true ); + orgName, username, name, email, dummyPassword, true, false ); management.activateOrganization( ownerOrgInfo.getOrganization() ); // redundant? applicationCreator.createSampleFor( ownerOrgInfo.getOrganization() ); @@ -718,11 +718,7 @@ public class ManagementResource extends AbstractContextResource { // when external tokens enabled then only superuser can obtain an access token final String superuserName = properties.getProperty( USERGRID_SYSADMIN_LOGIN_NAME ); - final String superuserAllowedStr = properties.getProperty( USERGRID_SYSADMIN_LOGIN_ALLOWED ); - final boolean superuserAllowed = !StringUtils.isEmpty( superuserAllowedStr ) - && superuserAllowedStr.trim().equalsIgnoreCase( "true" ); - - if ( superuserAllowed && !superuserName.equalsIgnoreCase( username )) { + if ( !username.equalsIgnoreCase( superuserName )) { // this guy is not the superuser throw new IllegalArgumentException( "Admin Users must login via " +