fix: Switched reference from package name to plugin name (#9916)

This commit is contained in:
Nidhi 2021-12-23 19:46:30 +05:30 committed by GitHub
parent b2855ccf77
commit 9af1f4c9f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -307,7 +307,7 @@ public class PluginServiceCEImpl extends BaseService<PluginRepository, Plugin, S
return
datasourceMono
.flatMap(datasource -> this.findById(datasource.getPluginId())
.map(Plugin::getPackageName));
.map(plugin -> plugin.getPluginName() == null ? plugin.getPackageName() : plugin.getPluginName()));
}
@Override

View File

@ -423,7 +423,8 @@ public class AuthenticationServiceCEImpl implements AuthenticationServiceCE {
integrationDTO.setInstallationKey(installationKey);
integrationDTO.setAuthenticationResponse(oAuth2.getAuthenticationResponse());
integrationDTO.setScope(oAuth2.getScope());
integrationDTO.setPluginName(plugin.getPackageName());
integrationDTO.setPluginName(plugin.getPluginName());
integrationDTO.setPluginVersion(plugin.getVersion());
WebClient.Builder builder = WebClient
.builder()

View File

@ -132,7 +132,7 @@ public class ImportExportApplicationServiceCEImpl implements ImportExportApplica
return pluginRepository
.findAll()
.map(plugin -> {
pluginMap.put(plugin.getId(), plugin.getPackageName());
pluginMap.put(plugin.getId(), plugin.getPluginName() == null ? plugin.getPackageName() : plugin.getPluginName());
return plugin;
})
.then(applicationMono)
@ -452,7 +452,8 @@ public class ImportExportApplicationServiceCEImpl implements ImportExportApplica
return pluginRepository.findAll()
.map(plugin -> {
pluginMap.put(plugin.getPackageName(), plugin.getId());
final String pluginReference = plugin.getPluginName() == null ? plugin.getPackageName() : plugin.getPluginName();
pluginMap.put(pluginReference, plugin.getId());
return plugin;
})
.then(organizationService.findById(organizationId, AclPermission.ORGANIZATION_MANAGE_APPLICATIONS))