mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
Merge pull request #2794 from spjspj/master
spjspj - Add Set Active to server console
This commit is contained in:
commit
f943b81c73
1 changed files with 9 additions and 1 deletions
|
|
@ -1488,7 +1488,15 @@ public class SessionImpl implements Session {
|
||||||
@Override
|
@Override
|
||||||
public boolean toggleActivation(String userName) {
|
public boolean toggleActivation(String userName) {
|
||||||
try {
|
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) {
|
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||||
if (isConnected()) {
|
if (isConnected()) {
|
||||||
server.toggleActivation(sessionId, userName);
|
server.toggleActivation(sessionId, userName);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue