import java.util.Iterator;
import java.util.List;
+import org.argeo.cms.util.useradmin.UserAdminUtils;
import org.argeo.security.ui.admin.SecurityAdminPlugin;
-import org.argeo.security.ui.admin.internal.UiAdminUtils;
import org.argeo.security.ui.admin.internal.UserAdminWrapper;
import org.argeo.security.ui.admin.internal.parts.UserEditorInput;
import org.eclipse.core.commands.AbstractHandler;
while (it.hasNext()) {
User currUser = it.next();
- String userName = UiAdminUtils.getUsername(currUser);
- if (UiAdminUtils.isCurrentUser(currUser)) {
+ String userName = UserAdminUtils.getUsername(currUser);
+ if (UserAdminUtils.isCurrentUser(currUser)) {
MessageDialog.openError(HandlerUtil.getActiveShell(event),
"Deletion forbidden",
"You cannot delete your own user this way.");
for (User user : users) {
String userName = user.getName();
-
// TODO find a way to close the editor cleanly if opened. Cannot be
// done through the UserAdminListeners, it causes a
// java.util.ConcurrentModificationException because disposing the
IEditorPart part = iwp.findEditor(new UserEditorInput(userName));
if (part != null)
iwp.closeEditor(part, false);
-
userAdmin.removeRole(userName);
+ }
+ userAdminWrapper.commitOrNotifyTransactionStateChange();
+
+ for (User user : users) {
userAdminWrapper.notifyListeners(new UserAdminEvent(null,
UserAdminEvent.ROLE_REMOVED, user));
}