|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.cloud.kicc.workflow.override; |
|
|
|
package com.cloud.kicc.workflow.override; |
|
|
|
|
|
|
|
|
|
|
|
import org.flowable.idm.api.User; |
|
|
|
import com.cloud.kicc.common.data.entity.KiccUser; |
|
|
|
import org.flowable.ui.common.security.SecurityUtils; |
|
|
|
|
|
|
|
import org.flowable.ui.common.tenant.TenantProvider; |
|
|
|
import org.flowable.ui.common.tenant.TenantProvider; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
@ -24,12 +23,12 @@ public class UiTenantProvider implements TenantProvider { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String getTenantId() { |
|
|
|
public String getTenantId() { |
|
|
|
User flowableUser = SecurityUtils.getCurrentUserObject(); |
|
|
|
KiccUser kiccUser = com.cloud.kicc.common.security.util.SecurityUtils.getUser(); |
|
|
|
if(flowableUser != null) { |
|
|
|
if(kiccUser != null) { |
|
|
|
// quotes can help solve whitespace issues, trimming here would not
|
|
|
|
// quotes can help solve whitespace issues, trimming here would not
|
|
|
|
// help solve the problem at source which is in user database
|
|
|
|
// help solve the problem at source which is in user database
|
|
|
|
LOGGER.debug("Using user tenantId: '{}'", flowableUser.getTenantId()); |
|
|
|
LOGGER.debug("Using user tenantId: '{}'", kiccUser.getTenantId()); |
|
|
|
return flowableUser.getTenantId(); |
|
|
|
return kiccUser.getTenantId(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LOGGER.debug("No tenantId"); |
|
|
|
LOGGER.debug("No tenantId"); |
|
|
|