Skip to content

Commit

Permalink
Merge branch 'devel' into CB-4731-duplicate-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniaBzzz authored Feb 23, 2024
2 parents 9038267 + 3898729 commit 3d57197
Show file tree
Hide file tree
Showing 65 changed files with 211 additions and 132 deletions.
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Model
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
Bundle-Version: 1.0.47.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.48.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.model</artifactId>
<version>1.0.47-SNAPSHOT</version>
<version>1.0.48-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Community Product
Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true
Bundle-Version: 23.3.5.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 24.0.0.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.product.ce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.product.ce</artifactId>
<version>23.3.5-SNAPSHOT</version>
<version>24.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Base JDBC drivers
Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true
Bundle-Version: 1.0.92.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.93.qualifier
Bundle-Release-Date: 20240304
Bundle-Vendor: DBeaver Corp
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.resources.drivers.base</artifactId>
<version>1.0.92-SNAPSHOT</version>
<version>1.0.93-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Server
Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true
Bundle-Version: 23.3.5.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 24.0.0.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.server</artifactId>
<version>23.3.5-SNAPSHOT</version>
<version>24.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Administration
Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true
Bundle-Version: 1.0.91.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.92.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.admin</artifactId>
<version>1.0.91-SNAPSHOT</version>
<version>1.0.92-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import io.cloudbeaver.service.DBWServiceServerConfigurator;
import io.cloudbeaver.service.admin.*;
import io.cloudbeaver.service.security.SMUtils;
import io.cloudbeaver.utils.WebAppUtils;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
Expand Down Expand Up @@ -257,7 +258,9 @@ public boolean grantUserTeam(@NotNull WebSession webSession, String user, String
if (grantor == null) {
throw new DBWebException("Cannot grant team in anonymous mode");
}
if (CommonUtils.equalObjects(user, webSession.getUser().getUserId())) {
if (!WebAppUtils.getWebApplication().isDistributed()
&& CommonUtils.equalObjects(user, webSession.getUser().getUserId())
) {
throw new DBWebException("You cannot edit your own permissions");
}
try {
Expand All @@ -281,7 +284,9 @@ public boolean revokeUserTeam(@NotNull WebSession webSession, String user, Strin
if (grantor == null) {
throw new DBWebException("Cannot revoke team in anonymous mode");
}
if (CommonUtils.equalObjects(user, webSession.getUser().getUserId())) {
if (!WebAppUtils.getWebApplication().isDistributed() &&
CommonUtils.equalObjects(user, webSession.getUser().getUserId())
) {
throw new DBWebException("You cannot edit your own permissions");
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Authentication
Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true
Bundle-Version: 1.0.91.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.92.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.auth</artifactId>
<version>1.0.91-SNAPSHOT</version>
<version>1.0.92-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Data Transfer
Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true
Bundle-Version: 1.0.92.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.93.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.data.transfer</artifactId>
<version>1.0.92-SNAPSHOT</version>
<version>1.0.93-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;

public class WebDataTransferServlet extends WebServiceServletBase {

Expand Down Expand Up @@ -67,7 +68,7 @@ protected void processServiceRequest(WebSession session, HttpServletRequest requ
}
String fileName = taskInfo.getExportFileName();
if (!CommonUtils.isEmpty(fileName)) {
fileName += "." + WebDataTransferUtils.getProcessorFileExtension(processor);
fileName += "." + WebDataTransferUtils.getProcessorFileExtension(processor, taskInfo.getParameters().getProcessorProperties());
} else {
fileName = taskInfo.getDataFileId();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
import org.jkiss.dbeaver.tools.transfer.registry.DataTransferProcessorDescriptor;
import org.jkiss.utils.CommonUtils;

import java.util.Map;

class WebDataTransferUtils {

private static final Log log = Log.getLog(WebDataTransferUtils.class);
public static final String EXTENSION = "extension";


public static String getProcessorFileExtension(DataTransferProcessorDescriptor processor) {
Expand All @@ -34,6 +37,14 @@ public static String getProcessorFileExtension(DataTransferProcessorDescriptor p
return CommonUtils.isEmpty(ext) ? "data" : ext;
}

public static String getProcessorFileExtension(DataTransferProcessorDescriptor processor, Map<String, Object> processorProperties) {
if (processorProperties != null && processorProperties.get(EXTENSION) != null) {
return CommonUtils.toString(processorProperties.get(EXTENSION), "data");
}

return getProcessorFileExtension(processor);
}

public static String normalizeFileName(
@NotNull String fileName,
@NotNull WebDataTransferOutputSettings outputSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ public WebAsyncTaskInfo dataTransferExportDataFromContainer(
}

@NotNull
private String makeUniqueFileName(WebSQLProcessor sqlProcessor, DataTransferProcessorDescriptor processor) {
private String makeUniqueFileName(
WebSQLProcessor sqlProcessor,
DataTransferProcessorDescriptor processor,
Map<String, Object> processorProperties
) {
if (processorProperties != null && processorProperties.get(StreamConsumerSettings.PROP_FILE_EXTENSION) != null) {
return sqlProcessor.getWebSession().getSessionId() + "_" + UUID.randomUUID() +
"." + processorProperties.get(StreamConsumerSettings.PROP_FILE_EXTENSION);
}
return sqlProcessor.getWebSession().getSessionId() + "_" + UUID.randomUUID() + "." + WebDataTransferUtils.getProcessorFileExtension(processor);
}

Expand Down Expand Up @@ -157,7 +165,8 @@ public void run(DBRProgressMonitor monitor) throws InvocationTargetException {
monitor.beginTask("Export data", 1);
try {
monitor.subTask("Export data using " + processor.getName());
Path exportFile = dataExportFolder.resolve(makeUniqueFileName(sqlProcessor, processor));
Path exportFile = dataExportFolder.resolve(
makeUniqueFileName(sqlProcessor, processor, parameters.getProcessorProperties()));
try {
exportData(monitor, processor, dataContainer, parameters, resultsInfo, exportFile);
} catch (Exception e) {
Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - File System
Bundle-SymbolicName: io.cloudbeaver.service.fs;singleton:=true
Bundle-Version: 1.0.9.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.10.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.fs</artifactId>
<version>1.0.9-SNAPSHOT</version>
<version>1.0.10-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Metadata
Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true
Bundle-Version: 1.0.95.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.96.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.metadata</artifactId>
<version>1.0.95-SNAPSHOT</version>
<version>1.0.96-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Resource manager NIO implementation
Bundle-SymbolicName: io.cloudbeaver.service.rm.nio;singleton:=true
Bundle-Version: 1.0.9.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.10.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm.nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm.nio</artifactId>
<version>1.0.9-SNAPSHOT</version>
<version>1.0.10-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Resource manager
Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true
Bundle-Version: 1.0.44.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.45.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm</artifactId>
<version>1.0.44-SNAPSHOT</version>
<version>1.0.45-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: Cloudbeaver Web Service - Security
Bundle-Vendor: DBeaver Corp
Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true
Bundle-Version: 1.0.47.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.48.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.security</artifactId>
<version>1.0.47-SNAPSHOT</version>
<version>1.0.48-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: CloudBeaver SLF4j Binding
Bundle-SymbolicName: io.cloudbeaver.slf4j;singleton:=true
Bundle-Version: 1.0.7.qualifier
Bundle-Release-Date: 20240219
Bundle-Version: 1.0.8.qualifier
Bundle-Release-Date: 20240304
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.slf4j</artifactId>
<version>1.0.7-SNAPSHOT</version>
<version>1.0.8-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.cloudbeaver.ce.drivers.feature"
label="Cloudbeaver CE 3rd Party Drivers"
version="1.0.115.qualifier"
version="1.0.116.qualifier"
provider-name="DBeaver Corp">

<plugin id="io.cloudbeaver.resources.drivers.base" download-size="0" install-size="0" version="0.0.0"/>
Expand Down
2 changes: 1 addition & 1 deletion server/features/io.cloudbeaver.ce.drivers.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.ce.drivers.feature</artifactId>
<version>1.0.115-SNAPSHOT</version>
<version>1.0.116-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.cloudbeaver.product.ce.feature"
label="%featureName"
version="23.3.5.qualifier"
version="24.0.0.qualifier"
provider-name="%providerName"
plugin="io.cloudbeaver.product.ce">

Expand Down
2 changes: 1 addition & 1 deletion server/features/io.cloudbeaver.product.ce.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.product.ce.feature</artifactId>
<version>23.3.5-SNAPSHOT</version>
<version>24.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

<build>
Expand Down
Loading

0 comments on commit 3d57197

Please sign in to comment.