Пример #1
0
 public void enable(List<String> usernames, LocalizedOperationResult result) {
   synchronized (enableUserMutex) {
     Set<String> potentialEnabledUsers = new HashSet<String>(toUserNames(userDao.enabledUsers()));
     potentialEnabledUsers.addAll(usernames);
     userDao.enableUsers(usernames);
   }
 }
Пример #2
0
 private boolean willDisableAllAdmins(List<String> usersToBeDisabled) {
   List<String> enabledUserNames = toUserNames(userDao.enabledUsers());
   enabledUserNames.removeAll(usersToBeDisabled);
   return !userNameListContainsAdmin(enabledUserNames);
 }