ju 7 years ago
parent
commit
d28eceecf6
  1. 8
      designer-base/src/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  2. 5
      designer-base/src/com/fr/design/env/RemoteWorkspace.java
  3. 2
      designer-base/src/com/fr/design/mainframe/loghandler/socketio/DesignerSocketIO.java
  4. 5
      designer-base/src/com/fr/design/remote/ui/UserManagerPane.java

8
designer-base/src/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -54,7 +54,7 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
String url = reader.getAttrAsString("url", StringUtils.EMPTY);
String username = reader.getAttrAsString("username", StringUtils.EMPTY);
//密码解密
String password = SecurityToolbox.decrypt(reader.getAttrAsString("password", StringUtils.EMPTY));
String password = SecurityToolbox.defaultDecrypt(reader.getAttrAsString("password", StringUtils.EMPTY));
this.connection = new WorkspaceConnection(url, username, password);
}
}
@ -68,14 +68,14 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
writer.startTAG("Connection");
writer.attr("url", connection.getUrl());
writer.attr("username", connection.getUserName());
writer.attr("password", SecurityToolbox.encrypt(connection.getPassword()));
writer.attr("password", SecurityToolbox.defaultEncrypt(connection.getPassword()));
writer.end();
}
}
@Override
public Object clone() throws CloneNotSupportedException {
return null;
}
}

5
designer-base/src/com/fr/design/env/RemoteWorkspace.java vendored

@ -1,11 +1,12 @@
package com.fr.design.env;
import com.fr.env.operator.decision.DecisionOperator;
import com.fr.general.Inter;
import com.fr.report.util.RemoteDesignAuthenticateUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceClient;
import com.fr.workspace.connect.WorkspaceConnection;
import com.fr.workspace.server.WorkspaceServerContext;
/**
* Created by juhaoyu on 2018/6/14.
@ -59,7 +60,7 @@ public class RemoteWorkspace implements Workspace {
@Override
public boolean isRoot() {
try {
return RemoteDesignAuthenticateUtils.isRoot(WorkspaceServerContext.currentUsername());
return WorkContext.getCurrent().get(DecisionOperator.class).isRoot(WorkContext.getConnector().currentUser());
} catch (Exception e) {
return false;
}

2
designer-base/src/com/fr/design/mainframe/loghandler/socketio/DesignerSocketIO.java

@ -84,7 +84,7 @@ public class DesignerSocketIO {
// }
// }
// });
socketIO.get().connect();
// socketIO.get().connect();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

5
designer-base/src/com/fr/design/remote/ui/UserManagerPane.java

@ -18,6 +18,7 @@ import com.fr.env.operator.decision.DecisionOperator;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.guava.collect.ImmutableList;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
@ -278,8 +279,8 @@ public class UserManagerPane extends BasicPane {
@Override
protected List<RemoteDesignMember> doInBackground() {
addingMembers.clear();
// String username = EnvConfigUtils.getUsername(EnvContext.currentEnv());
// addingMembers.addAll(EnvProxy.get(DecisionOperator.class).getMembers(username, keyword));
String username = WorkContext.getConnector().currentUser();
addingMembers.addAll(WorkContext.getCurrent().get(DecisionOperator.class).getMembers(username, keyword));
return addingMembers;
}

Loading…
Cancel
Save