mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
spjspj - Add Set Active to server console
This commit is contained in:
parent
6d3324378f
commit
6ed569b37f
1 changed files with 9 additions and 1 deletions
|
@ -1488,7 +1488,15 @@ public class SessionImpl implements Session {
|
|||
@Override
|
||||
public boolean toggleActivation(String userName) {
|
||||
try {
|
||||
if (JOptionPane.showConfirmDialog(null, "Are you sure you mean to activate/deactivate user: " + userName + " for?", "WARNING",
|
||||
if (JOptionPane.showConfirmDialog(null, "Did you want to set user: " + userName + " to active?", "WARNING",
|
||||
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
return setActivation(userName, true);
|
||||
}
|
||||
if (JOptionPane.showConfirmDialog(null, "Did you want to set user: " + userName + " to INactive?", "WARNING",
|
||||
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
return setActivation(userName, false);
|
||||
}
|
||||
if (JOptionPane.showConfirmDialog(null, "Are you sure you mean to toggle activation for user: " + userName + "?", "WARNING",
|
||||
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
if (isConnected()) {
|
||||
server.toggleActivation(sessionId, userName);
|
||||
|
|
Loading…
Reference in a new issue