Skip to content

Commit

Permalink
- removed unused code in task service session and updated callback im…
Browse files Browse the repository at this point in the history
…pl that used it
  • Loading branch information
mswiderski authored and krisv committed Oct 11, 2012
1 parent 958dc3e commit 679e926
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
Expand Up @@ -164,7 +164,6 @@ private void init() {
throw new IllegalArgumentException("All properties must be given ("+ DS_JNDI_NAME + ","
+ USER_ROLES_QUERY +"," + ROLES_QUERY +"," +USER_ROLES_QUERY +")");
}
UserGroupCallbackManager.getInstance().setProperty("disable.all.groups", "true");
String jndiName = this.config.getProperty(DS_JNDI_NAME, "java:/DefaultDS");
try {
InitialContext ctx = new InitialContext();
Expand Down
Expand Up @@ -82,7 +82,6 @@ public JAASUserGroupCallbackImpl() {

public JAASUserGroupCallbackImpl(String rolesPrincipleName) {
this.rolePrincipleName = rolesPrincipleName;
UserGroupCallbackManager.getInstance().setProperty("disable.all.groups", "true");
}

public String getRolePrincipleName() {
Expand Down
Expand Up @@ -98,13 +98,11 @@ public LDAPUserGroupCallbackImpl() {
config = null;
}
}
UserGroupCallbackManager.getInstance().setProperty("disable.all.groups", "true");
validate();
}

public LDAPUserGroupCallbackImpl(Properties config) {
this.config = config;
UserGroupCallbackManager.getInstance().setProperty("disable.all.groups", "true");
validate();
}

Expand Down
Expand Up @@ -94,7 +94,7 @@ public UserGroupCallback getCallback() {

public String getProperty(String name) {
if (this.callbackproperties != null) {
this.callbackproperties.getProperty(name);
return this.callbackproperties.getProperty(name);
}

return null;
Expand Down
Expand Up @@ -1188,12 +1188,7 @@ private List<String> doUserGroupCallbackOperation(String userId, List<String> gr
doCallbackUserOperation(userId);
doCallbackGroupsOperation(userId, groupIds);
List<String> allGroupIds = null;
if (UserGroupCallbackManager.getInstance().getProperty("disable.all.groups") == null) {
// get all groups
// (The fact that this isn't done in a query will probably become a problem at some point.. )
Query query = tpm.createNewQuery("select g.id from Group g");
allGroupIds = ((List<String>) query.getResultList());
}

return UserGroupCallbackManager.getInstance().getCallback().getGroupsForUser(userId, groupIds, allGroupIds);
} else {
logger.debug("UserGroupCallback has not been registered.");
Expand Down

0 comments on commit 679e926

Please sign in to comment.