Skip to content

Commit

Permalink
Address an edge case where an admin user may be created unactivated a…
Browse files Browse the repository at this point in the history
…nd approvals aren't necessary. Just set that user to activated.
  • Loading branch information
Scott Ganyo committed Aug 13, 2012
1 parent bcf602f commit d1c36e5
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -730,7 +730,7 @@ public UserInfo createAdminUser(String username, String name, String email,
user.setUsername(username);
user.setName(name);
user.setEmail(email);
user.setActivated(activated); // sdg - added
user.setActivated(activated);
user.setConfirmed(!newAdminUsersRequireConfirmation()); // only
// hardcoded
// param now
Expand Down Expand Up @@ -1946,8 +1946,11 @@ public void startAdminUserActivationFlow(UserInfo user) throws Exception {
sendAdminUserConfirmationEmail(user);
} else if (newAdminUsersNeedSysAdminApproval()) {
sendSysAdminRequestAdminActivationEmail(user);
} else {
// sdg: There seems to be a hole in the logic. The user has been created
// in an inactive state but nobody is being notified.
activateAdminUser(user.getUuid());
}
// sdg: else... anything?
}
}

Expand Down

0 comments on commit d1c36e5

Please sign in to comment.