|
@@ -341,8 +341,10 @@ public class IotedgeCollectDataServiceImpl extends ServiceImpl<IotedgeCollectDat
|
|
|
public String addIoTedgeUser(String userName, String ssoRole, String userId, String elToken) {
|
|
|
String result = "200";
|
|
|
|
|
|
+ String iotToken = restClientService.getAccessToken();
|
|
|
+
|
|
|
try {
|
|
|
- JSONObject jsonObject = restClientService.invitationSSOUserInIoTEdge(userName, elToken);
|
|
|
+ JSONObject jsonObject = restClientService.invitationSSOUserInIoTEdge(userName, iotToken);
|
|
|
String code = (String) jsonObject.get("code");
|
|
|
String iotUserId = (String) jsonObject.get("userId");
|
|
|
|
|
@@ -352,10 +354,10 @@ public class IotedgeCollectDataServiceImpl extends ServiceImpl<IotedgeCollectDat
|
|
|
String rloe = "";
|
|
|
if ("globalAdmin".equals(ssoRole)){
|
|
|
rloe = "systemAdmin";
|
|
|
- restClientService.setUserRole(iotUserId,"",rloe,elToken);
|
|
|
+ restClientService.setUserRole(iotUserId,"",rloe,iotToken);
|
|
|
}else {
|
|
|
- restClientService.setUserRole(iotUserId,"","systemAdmin",elToken);
|
|
|
- restClientService.deleteUserRole(iotUserId,"","systemAdmin",elToken);
|
|
|
+ restClientService.setUserRole(iotUserId,"","systemAdmin",iotToken);
|
|
|
+ restClientService.deleteUserRole(iotUserId,"","systemAdmin",iotToken);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.info("IoTEdge邀请SSO用户失败: {}"+e.getMessage());
|