mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
Merge branch 'devel' into CB-2337-users-table-filtering
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
anonymousAccessEnabled: true,
|
||||
anonymousUserRole: "user",
|
||||
supportsCustomConnections: false,
|
||||
showReadOnlyConnectionInfo: false,
|
||||
|
||||
forwardProxy: false,
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
anonymousAccessEnabled: true,
|
||||
anonymousUserRole: "user",
|
||||
supportsCustomConnections: false,
|
||||
showReadOnlyConnectionInfo: false,
|
||||
|
||||
forwardProxy: false,
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/eclipse-temurin:17.0.4.1_1-jre-focal
|
||||
FROM eclipse-temurin:17.0.4.1_1-jre-focal
|
||||
|
||||
COPY cloudbeaver /opt/cloudbeaver
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
|
||||
Bundle-Version: 1.0.16.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.17.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
Require-Bundle: org.jkiss.dbeaver.model;visibility:=reexport,
|
||||
org.jkiss.dbeaver.model.sm;visibility:=reexport,
|
||||
org.jkiss.dbeaver.registry;visibility:=reexport,
|
||||
org.jkiss.dbeaver.net.ssh,
|
||||
org.jkiss.bundle.graphql.java;visibility:=reexport,
|
||||
|
||||
@@ -7,4 +7,6 @@
|
||||
<extension-point id="io.cloudbeaver.valueSerializer" name="Web value serializers" schema="schema/io.cloudbeaver.valueSerializer.exsd"/>
|
||||
<extension-point id="org.jkiss.dbeaver.auth.provider" name="%extension-point.org.jkiss.dbeaver.authProvider.name" schema="schema/org.jkiss.dbeaver.authProvider.exsd"/>
|
||||
<extension-point id="io.cloudbeaver.event.handler" name="Wev event handler" schema="schema/io.cloudbeaver.event.handler.exsd"/>
|
||||
<extension-point id="io.cloudbeaver.metaParameters" name="Meta parameters" schema="schema/io.cloudbeaver.metaParameters.exsd"/>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.model</artifactId>
|
||||
<version>1.0.16-SNAPSHOT</version>
|
||||
<version>1.0.17-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<schema targetNamespace="org.jkiss.dbeaver.core" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="io.cloudbeaver.auth" id="io.cloudbeaver.userProfile" name="User profile properties"/>
|
||||
<meta.schema plugin="io.cloudbeaver.model" id="io.cloudbeaver.metaParameters" name="Subject meta parameters"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
</documentation>
|
||||
+17
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* DBeaver - Universal Database Manager
|
||||
* Copyright (C) 2010-2022 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.cloudbeaver;
|
||||
|
||||
import org.jkiss.code.NotNull;
|
||||
|
||||
+52
-14
@@ -17,11 +17,14 @@
|
||||
package io.cloudbeaver.model;
|
||||
|
||||
import io.cloudbeaver.WebProjectImpl;
|
||||
import io.cloudbeaver.model.app.BaseWebAppConfiguration;
|
||||
import io.cloudbeaver.model.session.WebSession;
|
||||
import io.cloudbeaver.service.security.SMUtils;
|
||||
import io.cloudbeaver.service.sql.WebDataFormat;
|
||||
import io.cloudbeaver.utils.CBModelConstants;
|
||||
import io.cloudbeaver.utils.WebAppUtils;
|
||||
import io.cloudbeaver.utils.WebCommonUtils;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.model.DBPDataSource;
|
||||
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
|
||||
import org.jkiss.dbeaver.model.DBPDataSourceFolder;
|
||||
@@ -38,10 +41,7 @@ import org.jkiss.dbeaver.model.rm.RMProjectPermission;
|
||||
import org.jkiss.dbeaver.runtime.DBWorkbench;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -49,6 +49,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public class WebConnectionInfo {
|
||||
|
||||
private static final String SECURED_VALUE = "********";
|
||||
private final WebSession session;
|
||||
private final DBPDataSourceContainer dataSourceContainer;
|
||||
private WebServerError connectError;
|
||||
@@ -99,12 +100,18 @@ public class WebConnectionInfo {
|
||||
|
||||
@Property
|
||||
public String getHost() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHostName();
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHostName();
|
||||
}
|
||||
return SECURED_VALUE;
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getPort() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHostPort();
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHostPort();
|
||||
}
|
||||
return SECURED_VALUE;
|
||||
}
|
||||
|
||||
@Property
|
||||
@@ -114,17 +121,26 @@ public class WebConnectionInfo {
|
||||
|
||||
@Property
|
||||
public String getDatabaseName() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getDatabaseName();
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getDatabaseName();
|
||||
}
|
||||
return SECURED_VALUE;
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getUrl() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getUrl();
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getUrl();
|
||||
}
|
||||
return SECURED_VALUE;
|
||||
}
|
||||
|
||||
@Property
|
||||
public Map<String, String> getProperties() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getProperties();
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getProperties();
|
||||
}
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
@Property
|
||||
@@ -157,6 +173,16 @@ public class WebConnectionInfo {
|
||||
return dataSourceContainer.isSavePassword();
|
||||
}
|
||||
|
||||
@Property
|
||||
public boolean isCredentialsSaved() throws DBException {
|
||||
return dataSourceContainer.isCredentialsSaved();
|
||||
}
|
||||
|
||||
@Property
|
||||
public boolean isSharedCredentials() {
|
||||
return dataSourceContainer.isSharedCredentials();
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getFolder() {
|
||||
DBPDataSourceFolder folder = dataSourceContainer.getFolder();
|
||||
@@ -265,9 +291,9 @@ public class WebConnectionInfo {
|
||||
}
|
||||
|
||||
@Property
|
||||
public boolean isAuthNeeded() {
|
||||
public boolean isAuthNeeded() throws DBException {
|
||||
return !dataSourceContainer.isConnected() &&
|
||||
!dataSourceContainer.isSavePassword() &&
|
||||
!dataSourceContainer.isCredentialsSaved() &&
|
||||
!dataSourceContainer.getDriver().isAnonymousAccess();
|
||||
}
|
||||
|
||||
@@ -301,8 +327,11 @@ public class WebConnectionInfo {
|
||||
|
||||
@Property
|
||||
public List<WebNetworkHandlerConfig> getNetworkHandlersConfig() {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHandlers().stream()
|
||||
.map(WebNetworkHandlerConfig::new).collect(Collectors.toList());
|
||||
if (canViewReadOnlyConnections()) {
|
||||
return dataSourceContainer.getConnectionConfiguration().getHandlers().stream()
|
||||
.map(WebNetworkHandlerConfig::new).collect(Collectors.toList());
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Property
|
||||
@@ -341,7 +370,7 @@ public class WebConnectionInfo {
|
||||
|
||||
@Property
|
||||
public boolean isCanViewSettings() {
|
||||
return true;
|
||||
return canViewReadOnlyConnections();
|
||||
}
|
||||
|
||||
@Property
|
||||
@@ -371,4 +400,13 @@ public class WebConnectionInfo {
|
||||
}
|
||||
return SMUtils.hasProjectPermission(session, ((WebProjectImpl) project).getRmProject(), projectPermission);
|
||||
}
|
||||
|
||||
private boolean canViewReadOnlyConnections() {
|
||||
if (isCanEdit()) {
|
||||
return true;
|
||||
}
|
||||
BaseWebAppConfiguration appConfig = (BaseWebAppConfiguration) WebAppUtils.getWebApplication().getAppConfiguration();
|
||||
return appConfig.isShowReadOnlyConnectionInfo();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -31,6 +31,7 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
|
||||
protected final Map<String, Object> plugins;
|
||||
protected String defaultUserTeam;
|
||||
protected boolean resourceManagerEnabled;
|
||||
protected boolean showReadOnlyConnectionInfo;
|
||||
protected String[] enabledFeatures;
|
||||
|
||||
public BaseWebAppConfiguration() {
|
||||
@@ -38,6 +39,7 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
|
||||
this.defaultUserTeam = DEFAULT_APP_ANONYMOUS_TEAM_NAME;
|
||||
this.resourceManagerEnabled = true;
|
||||
this.enabledFeatures = null;
|
||||
this.showReadOnlyConnectionInfo = false;
|
||||
}
|
||||
|
||||
public BaseWebAppConfiguration(BaseWebAppConfiguration src) {
|
||||
@@ -45,6 +47,7 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
|
||||
this.defaultUserTeam = src.defaultUserTeam;
|
||||
this.resourceManagerEnabled = src.resourceManagerEnabled;
|
||||
this.enabledFeatures = src.enabledFeatures;
|
||||
this.showReadOnlyConnectionInfo = src.showReadOnlyConnectionInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,4 +101,8 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
|
||||
public void setEnabledFeatures(String[] enabledFeatures) {
|
||||
this.enabledFeatures = enabledFeatures;
|
||||
}
|
||||
|
||||
public boolean isShowReadOnlyConnectionInfo() {
|
||||
return showReadOnlyConnectionInfo;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -34,7 +34,6 @@ import org.jkiss.dbeaver.model.app.DBPWorkspace;
|
||||
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
|
||||
import org.jkiss.dbeaver.model.data.json.JSONUtils;
|
||||
import org.jkiss.dbeaver.model.impl.app.ApplicationRegistry;
|
||||
import org.jkiss.dbeaver.model.impl.app.LocalSecretController;
|
||||
import org.jkiss.dbeaver.model.rm.RMController;
|
||||
import org.jkiss.dbeaver.model.rm.RMProject;
|
||||
import org.jkiss.dbeaver.model.secret.DBSSecretController;
|
||||
@@ -140,9 +139,14 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no secret controller in base web app.
|
||||
* Method returns VoidSecretController instance.
|
||||
* Advanced apps may implement it differently.
|
||||
*/
|
||||
@Override
|
||||
public DBSSecretController getSecretController(@NotNull SMCredentialsProvider credentialsProvider) throws DBException {
|
||||
return new LocalSecretController("user/" + credentialsProvider.getActiveUserCredentials().getUserId());
|
||||
return VoidSecretController.INSTANCE;
|
||||
}
|
||||
|
||||
protected Map<String, Object> getServerConfigProps(Map<String, Object> configProps) {
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* DBeaver - Universal Database Manager
|
||||
* Copyright (C) 2010-2022 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.cloudbeaver.model.app;
|
||||
|
||||
import org.jkiss.code.NotNull;
|
||||
import org.jkiss.code.Nullable;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.model.secret.DBSSecretController;
|
||||
|
||||
/**
|
||||
* Void secret controller.
|
||||
*/
|
||||
public class VoidSecretController implements DBSSecretController {
|
||||
|
||||
public static final VoidSecretController INSTANCE = new VoidSecretController();
|
||||
|
||||
public VoidSecretController() {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getSecretValue(@NotNull String secretId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSecretValue(@NotNull String secretId, @Nullable String secretValue) throws DBException {
|
||||
throw new DBException("Secret controller is read-only");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flushChanges() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,10 +3,12 @@ package io.cloudbeaver.model.rm;
|
||||
import io.cloudbeaver.DBWConstants;
|
||||
import io.cloudbeaver.model.app.BaseWebApplication;
|
||||
import org.jkiss.code.NotNull;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.model.rm.RMProject;
|
||||
import org.jkiss.dbeaver.model.rm.RMProjectPermission;
|
||||
import org.jkiss.dbeaver.model.rm.RMProjectType;
|
||||
import org.jkiss.dbeaver.runtime.DBWorkbench;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
@@ -46,18 +48,25 @@ public class RMUtils {
|
||||
* @return path to the project based on the name of projects and prefixes that it contains
|
||||
*/
|
||||
@NotNull
|
||||
public static Path getProjectPathByName(@NotNull String projectId) {
|
||||
if (!projectId.contains("_") || projectId.startsWith("_")) {
|
||||
return getRootPath().resolve(BaseWebApplication.getInstance().getDefaultProjectName());
|
||||
public static Path getProjectPathByName(@NotNull String projectId) throws DBException {
|
||||
int divPos = projectId.indexOf("_");
|
||||
if (divPos <= 0) {
|
||||
throw new DBException("Bad project ID");
|
||||
}
|
||||
String prefix = projectId.substring(0, projectId.indexOf("_"));
|
||||
|
||||
String prefix = projectId.substring(0, divPos);
|
||||
String projectName = projectId.substring(divPos + 1);
|
||||
switch (RMProjectType.getByPrefix(prefix)) {
|
||||
case GLOBAL:
|
||||
return getRootPath().resolve(BaseWebApplication.getInstance().getDefaultProjectName());
|
||||
String defaultProjectName = BaseWebApplication.getInstance().getDefaultProjectName();
|
||||
if (CommonUtils.isEmpty(defaultProjectName)) {
|
||||
throw new DBException("Global projects are not supported");
|
||||
}
|
||||
return getRootPath().resolve(defaultProjectName);
|
||||
case SHARED:
|
||||
return getSharedProjectsPath().resolve(projectId);
|
||||
return getSharedProjectsPath().resolve(projectName);
|
||||
default:
|
||||
return getUserProjectsPath().resolve(projectId);
|
||||
return getUserProjectsPath().resolve(projectName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -155,6 +155,7 @@ public class LocalResourceController implements RMController {
|
||||
if (userProject != null) {
|
||||
projects.add(0, userProject);
|
||||
}
|
||||
projects.sort(Comparator.comparing(RMProject::getDisplayName));
|
||||
return projects.toArray(new RMProject[0]);
|
||||
}
|
||||
|
||||
@@ -172,7 +173,6 @@ public class LocalResourceController implements RMController {
|
||||
RMProjectType.SHARED, true)
|
||||
)
|
||||
.filter(Objects::nonNull)
|
||||
.sorted(Comparator.comparing(RMProject::getDisplayName))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
+13
-1
@@ -23,11 +23,13 @@ import io.cloudbeaver.model.user.WebUser;
|
||||
import org.jkiss.code.NotNull;
|
||||
import org.jkiss.code.Nullable;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.Log;
|
||||
import org.jkiss.dbeaver.model.auth.SMAuthInfo;
|
||||
import org.jkiss.dbeaver.model.auth.SMAuthStatus;
|
||||
import org.jkiss.dbeaver.model.auth.SMCredentials;
|
||||
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
|
||||
import org.jkiss.dbeaver.model.exec.DBCException;
|
||||
import org.jkiss.dbeaver.model.secret.DBSSecretController;
|
||||
import org.jkiss.dbeaver.model.security.SMAdminController;
|
||||
import org.jkiss.dbeaver.model.security.SMController;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
@@ -40,6 +42,8 @@ import java.util.Set;
|
||||
* Contains user state and services based on available permissions
|
||||
*/
|
||||
public class WebUserContext implements SMCredentialsProvider {
|
||||
private static final Log log = Log.getLog(WebUserContext.class);
|
||||
|
||||
private final WebApplication application;
|
||||
|
||||
private WebUser user;
|
||||
@@ -50,6 +54,7 @@ public class WebUserContext implements SMCredentialsProvider {
|
||||
|
||||
private SMController securityController;
|
||||
private SMAdminController adminSecurityController;
|
||||
private DBSSecretController secretController;
|
||||
|
||||
public WebUserContext(WebApplication application) throws DBException {
|
||||
this.application = application;
|
||||
@@ -64,7 +69,7 @@ public class WebUserContext implements SMCredentialsProvider {
|
||||
* @throws DBException - if user already authorized and new token come from another user
|
||||
*/
|
||||
public synchronized boolean refresh(SMAuthInfo smAuthInfo) throws DBException {
|
||||
if (smAuthInfo.getAuthStatus() != SMAuthStatus.SUCCESS) {
|
||||
if (smAuthInfo.getAuthStatus() != SMAuthStatus.SUCCESS || smAuthInfo.getSmAuthToken() == null) {
|
||||
throw new DBCException("Authorization did not complete successfully");
|
||||
}
|
||||
var isNonAnonymousUserAuthorized = isAuthorizedInSecurityManager() && getUser() != null;
|
||||
@@ -85,6 +90,7 @@ public class WebUserContext implements SMCredentialsProvider {
|
||||
this.userPermissions = authPermissions.getPermissions();
|
||||
this.securityController = application.createSecurityController(this);
|
||||
this.adminSecurityController = application.getAdminSecurityController(this);
|
||||
this.secretController = application.getSecretController(this);
|
||||
if (isSessionChanged) {
|
||||
this.smSessionId = smAuthInfo.getAuthPermissions().getSessionId();
|
||||
setUser(authPermissions.getUserId() == null ? null : new WebUser(securityController.getCurrentUser()));
|
||||
@@ -114,12 +120,14 @@ public class WebUserContext implements SMCredentialsProvider {
|
||||
this.securityController.logout();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Error logging out user", e);
|
||||
}
|
||||
this.userPermissions = getDefaultPermissions();
|
||||
this.smCredentials = null;
|
||||
this.user = null;
|
||||
this.securityController = application.createSecurityController(this);
|
||||
this.adminSecurityController = null;
|
||||
this.secretController = application.getSecretController(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -172,6 +180,10 @@ public class WebUserContext implements SMCredentialsProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public DBSSecretController getSecretController() {
|
||||
return secretController;
|
||||
}
|
||||
|
||||
public synchronized String getSmSessionId() {
|
||||
return smSessionId;
|
||||
}
|
||||
|
||||
+5
-5
@@ -46,7 +46,7 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor {
|
||||
private final IConfigurationElement cfg;
|
||||
|
||||
private final ObjectType implType;
|
||||
private final Map<SMSubjectType, List<DBPPropertyDescriptor>> metaProperties = new HashMap<>();
|
||||
private final Map<SMSubjectType, List<DBPPropertyDescriptor>> metaParameters = new HashMap<>();
|
||||
private SMAuthProvider<?> instance;
|
||||
private final DBPImage icon;
|
||||
private final Map<String, PropertyDescriptor> configurationParameters = new LinkedHashMap<>();
|
||||
@@ -76,13 +76,13 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor {
|
||||
for (IConfigurationElement credElement : cfg.getChildren("credentials")) {
|
||||
credentialProfiles.add(new SMAuthCredentialsProfile(credElement));
|
||||
}
|
||||
for (IConfigurationElement mpElement : cfg.getChildren("metaProperties")) {
|
||||
for (IConfigurationElement mpElement : cfg.getChildren("metaParameters")) {
|
||||
SMSubjectType subjectType = CommonUtils.valueOf(SMSubjectType.class, mpElement.getAttribute("type"), SMSubjectType.user);
|
||||
List<DBPPropertyDescriptor> metaProps = new ArrayList<>();
|
||||
for (IConfigurationElement propGroup : ArrayUtils.safeArray(mpElement.getChildren(PropertyDescriptor.TAG_PROPERTY_GROUP))) {
|
||||
metaProps.addAll(PropertyDescriptor.extractProperties(propGroup));
|
||||
}
|
||||
metaProperties.put(subjectType, metaProps);
|
||||
metaParameters.put(subjectType, metaProps);
|
||||
}
|
||||
|
||||
String rfList = cfg.getAttribute("requiredFeatures");
|
||||
@@ -182,8 +182,8 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<DBPPropertyDescriptor> getMetaProperties(SMSubjectType subjectType) {
|
||||
return metaProperties.get(subjectType);
|
||||
public List<DBPPropertyDescriptor> getMetaParameters(SMSubjectType subjectType) {
|
||||
return metaParameters.get(subjectType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+23
-12
@@ -27,36 +27,47 @@ import org.jkiss.utils.ArrayUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WebUserProfileRegistry {
|
||||
public class WebMetaParametersRegistry {
|
||||
|
||||
private static final Log log = Log.getLog(WebUserProfileRegistry.class);
|
||||
private static final Log log = Log.getLog(WebMetaParametersRegistry.class);
|
||||
|
||||
public static final String EXTENSION_ID = "io.cloudbeaver.userProfile"; //$NON-NLS-1$
|
||||
public static final String EXTENSION_ID = "io.cloudbeaver.metaParameters"; //$NON-NLS-1$
|
||||
|
||||
private static WebUserProfileRegistry instance = null;
|
||||
private final List<DBPPropertyDescriptor> properties = new ArrayList<>();
|
||||
private static WebMetaParametersRegistry instance = null;
|
||||
private final List<DBPPropertyDescriptor> userParameters = new ArrayList<>();
|
||||
private final List<DBPPropertyDescriptor> teamParameters = new ArrayList<>();
|
||||
|
||||
public synchronized static WebUserProfileRegistry getInstance() {
|
||||
public synchronized static WebMetaParametersRegistry getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new WebUserProfileRegistry();
|
||||
instance = new WebMetaParametersRegistry();
|
||||
instance.loadExtensions(Platform.getExtensionRegistry());
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private WebUserProfileRegistry() {
|
||||
private WebMetaParametersRegistry() {
|
||||
}
|
||||
|
||||
public List<DBPPropertyDescriptor> getProperties() {
|
||||
return properties;
|
||||
public List<DBPPropertyDescriptor> getUserParameters() {
|
||||
return userParameters;
|
||||
}
|
||||
|
||||
public List<DBPPropertyDescriptor> getTeamParameters() {
|
||||
return teamParameters;
|
||||
}
|
||||
|
||||
private void loadExtensions(IExtensionRegistry registry) {
|
||||
IConfigurationElement[] extConfigs = registry.getConfigurationElementsFor(EXTENSION_ID);
|
||||
for (IConfigurationElement ext : extConfigs) {
|
||||
if (ext.getName().equals("userProfileProperties")) {
|
||||
if (ext.getName().equals("metaParameters")) {
|
||||
boolean isUser = "user".equals(ext.getAttribute("type"));
|
||||
for (IConfigurationElement propGroup : ArrayUtils.safeArray(ext.getChildren(PropertyDescriptor.TAG_PROPERTY_GROUP))) {
|
||||
properties.addAll(PropertyDescriptor.extractProperties(propGroup));
|
||||
List<DBPPropertyDescriptor> props = PropertyDescriptor.extractProperties(propGroup);
|
||||
if (isUser) {
|
||||
userParameters.addAll(props);
|
||||
} else {
|
||||
teamParameters.addAll(props);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true
|
||||
Bundle-Version: 22.2.4.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 22.2.5.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.product.ce</artifactId>
|
||||
<version>22.2.4-SNAPSHOT</version>
|
||||
<version>22.2.5-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -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.61.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.62.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-Vendor: DBeaver Corp
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.resources.drivers.base</artifactId>
|
||||
<version>1.0.61-SNAPSHOT</version>
|
||||
<version>1.0.62-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true
|
||||
Bundle-Version: 22.2.4.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 22.2.5.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.server</artifactId>
|
||||
<version>22.2.4-SNAPSHOT</version>
|
||||
<version>22.2.5-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -301,8 +301,19 @@ type ConnectionInfo {
|
||||
connected: Boolean!
|
||||
provided: Boolean!
|
||||
readOnly: Boolean!
|
||||
# Forces connection URL use, host/port/database parameters will be ignored
|
||||
useUrl: Boolean!
|
||||
|
||||
# Forces credentials save. This flag doesn't work in shared projects.
|
||||
saveCredentials: Boolean!
|
||||
# Shared credentials - the same for all users, stored in secure storage.
|
||||
sharedCredentials: Boolean!
|
||||
# Determines that credentials were saved for current user.
|
||||
# This field read is slow, it should be read only when it really needed
|
||||
credentialsSaved: Boolean!
|
||||
# Determines that additional credentials are needed to connect
|
||||
# This field read is slow, it should be read only when it really needed
|
||||
authNeeded: Boolean!
|
||||
|
||||
folder: ID
|
||||
nodePath: String
|
||||
@@ -314,7 +325,6 @@ type ConnectionInfo {
|
||||
|
||||
origin: ObjectOrigin!
|
||||
|
||||
authNeeded: Boolean!
|
||||
authModel: ID
|
||||
authProperties: [ObjectPropertyInfo!]!
|
||||
|
||||
@@ -453,6 +463,7 @@ input ConnectionConfig {
|
||||
# User credentials
|
||||
|
||||
saveCredentials: Boolean
|
||||
sharedCredentials: Boolean
|
||||
authModelId: ID
|
||||
credentials: Object
|
||||
|
||||
@@ -558,7 +569,8 @@ extend type Mutation {
|
||||
testNetworkHandler( config: NetworkHandlerConfigInput! ): NetworkEndpointInfo!
|
||||
|
||||
# Initiate existing connection
|
||||
initConnection( id: ID!, projectId: ID, credentials: Object, networkCredentials: [NetworkHandlerConfigInput!], saveCredentials: Boolean ): ConnectionInfo!
|
||||
initConnection( id: ID!, projectId: ID, credentials: Object, networkCredentials: [NetworkHandlerConfigInput!],
|
||||
saveCredentials:Boolean, sharedCredentials: Boolean ): ConnectionInfo!
|
||||
|
||||
# Disconnect from database
|
||||
closeConnection( id: ID!, projectId: ID ): ConnectionInfo!
|
||||
|
||||
@@ -140,7 +140,13 @@ public class WebServiceUtils extends WebCommonUtils {
|
||||
//navSettings.setShowSystemObjects(false);
|
||||
((DataSourceDescriptor)newDataSource).setNavigatorSettings(navSettings);
|
||||
|
||||
saveAuthProperties(newDataSource, newDataSource.getConnectionConfiguration(), config.getCredentials(), config.isSaveCredentials());
|
||||
saveAuthProperties(
|
||||
newDataSource,
|
||||
newDataSource.getConnectionConfiguration(),
|
||||
config.getCredentials(),
|
||||
config.isSaveCredentials(),
|
||||
config.isSharedCredentials()
|
||||
);
|
||||
|
||||
|
||||
return newDataSource;
|
||||
@@ -245,9 +251,11 @@ public class WebServiceUtils extends WebCommonUtils {
|
||||
@NotNull DBPDataSourceContainer dataSourceContainer,
|
||||
@NotNull DBPConnectionConfiguration configuration,
|
||||
@Nullable Map<String, Object> authProperties,
|
||||
boolean saveCredentials)
|
||||
{
|
||||
boolean saveCredentials,
|
||||
boolean sharedCredentials
|
||||
) {
|
||||
dataSourceContainer.setSavePassword(saveCredentials);
|
||||
dataSourceContainer.setSharedCredentials(sharedCredentials);
|
||||
if (!saveCredentials) {
|
||||
// Reset credentials
|
||||
if (authProperties == null) {
|
||||
@@ -293,7 +301,13 @@ public class WebServiceUtils extends WebCommonUtils {
|
||||
dataSource.setFolder(null);
|
||||
}
|
||||
getGlobalDataSourceRegistry().getAllFolders().clear();
|
||||
saveAuthProperties(dataSource, dataSource.getConnectionConfiguration(), config.getCredentials(), config.isSaveCredentials());
|
||||
saveAuthProperties(
|
||||
dataSource,
|
||||
dataSource.getConnectionConfiguration(),
|
||||
config.getCredentials(),
|
||||
config.isSaveCredentials(),
|
||||
config.isSharedCredentials()
|
||||
);
|
||||
}
|
||||
|
||||
public static DBNBrowseSettings parseNavigatorSettings(Map<String, Object> settingsMap) {
|
||||
|
||||
@@ -53,6 +53,7 @@ public class WebConnectionConfig {
|
||||
private String authModelId;
|
||||
private Map<String, Object> credentials;
|
||||
private boolean saveCredentials;
|
||||
private boolean sharedCredentials;
|
||||
private Map<String, Object> providerProperties;
|
||||
private List<WebNetworkHandlerConfigInput> networkHandlersConfig;
|
||||
private DBPDriverConfigurationType configurationType;
|
||||
@@ -90,6 +91,7 @@ public class WebConnectionConfig {
|
||||
authModelId = JSONUtils.getString(params, "authModelId");
|
||||
credentials = JSONUtils.getObjectOrNull(params, "credentials");
|
||||
saveCredentials = JSONUtils.getBoolean(params, "saveCredentials");
|
||||
sharedCredentials = JSONUtils.getBoolean(params, "sharedCredentials");
|
||||
|
||||
providerProperties = JSONUtils.getObjectOrNull(params, "providerProperties");
|
||||
|
||||
@@ -207,6 +209,11 @@ public class WebConnectionConfig {
|
||||
return saveCredentials;
|
||||
}
|
||||
|
||||
@Property
|
||||
public boolean isSharedCredentials() {
|
||||
return sharedCredentials;
|
||||
}
|
||||
|
||||
public void setSaveCredentials(boolean saveCredentials) {
|
||||
this.saveCredentials = saveCredentials;
|
||||
}
|
||||
|
||||
@@ -930,23 +930,25 @@ public class CBApplication extends BaseWebApplication implements WebAuthApplicat
|
||||
rootConfig.put("app", appConfigProperties);
|
||||
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "anonymousAccessEnabled", appConfig.isAnonymousAccessEnabled());
|
||||
oldAppConfig, appConfigProperties, "anonymousAccessEnabled", appConfig.isAnonymousAccessEnabled());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "supportsCustomConnections", appConfig.isSupportsCustomConnections());
|
||||
oldAppConfig, appConfigProperties, "supportsCustomConnections", appConfig.isSupportsCustomConnections());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "publicCredentialsSaveEnabled", appConfig.isPublicCredentialsSaveEnabled());
|
||||
oldAppConfig, appConfigProperties, "publicCredentialsSaveEnabled", appConfig.isPublicCredentialsSaveEnabled());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "adminCredentialsSaveEnabled", appConfig.isAdminCredentialsSaveEnabled());
|
||||
oldAppConfig, appConfigProperties, "adminCredentialsSaveEnabled", appConfig.isAdminCredentialsSaveEnabled());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "enableReverseProxyAuth", appConfig.isEnabledReverseProxyAuth());
|
||||
oldAppConfig, appConfigProperties, "enableReverseProxyAuth", appConfig.isEnabledReverseProxyAuth());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "forwardProxy", appConfig.isEnabledForwardProxy());
|
||||
oldAppConfig, appConfigProperties, "forwardProxy", appConfig.isEnabledForwardProxy());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "linkExternalCredentialsWithUser", appConfig.isLinkExternalCredentialsWithUser());
|
||||
oldAppConfig, appConfigProperties, "linkExternalCredentialsWithUser", appConfig.isLinkExternalCredentialsWithUser());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, "redirectOnFederatedAuth", appConfig.isRedirectOnFederatedAuth());
|
||||
oldAppConfig, appConfigProperties, "redirectOnFederatedAuth", appConfig.isRedirectOnFederatedAuth());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, CBConstants.PARAM_RESOURCE_MANAGER_ENABLED, appConfig.isResourceManagerEnabled());
|
||||
oldAppConfig, appConfigProperties, CBConstants.PARAM_RESOURCE_MANAGER_ENABLED, appConfig.isResourceManagerEnabled());
|
||||
copyConfigValue(
|
||||
oldAppConfig, appConfigProperties, CBConstants.PARAM_SHOW_READ_ONLY_CONN_INFO, appConfig.isShowReadOnlyConnectionInfo());
|
||||
|
||||
Map<String, Object> resourceQuotas = new LinkedHashMap<>();
|
||||
Map<String, Object> originResourceQuotas = JSONUtils.getObject(oldAppConfig, CBConstants.PARAM_RESOURCE_QUOTAS);
|
||||
|
||||
@@ -39,6 +39,7 @@ public class CBConstants {
|
||||
public static final String PARAM_STATIC_CONTENT = "staticContent";
|
||||
public static final String PARAM_RESOURCE_QUOTAS = "resourceQuotas";
|
||||
public static final String PARAM_RESOURCE_MANAGER_ENABLED = "resourceManagerEnabled";
|
||||
public static final String PARAM_SHOW_READ_ONLY_CONN_INFO = "showReadOnlyConnectionInfo";
|
||||
public static final String PARAM_AUTH_PROVIDERS = "authConfiguration";
|
||||
public static final String PARAM_DB_CONFIGURATION = "database";
|
||||
|
||||
|
||||
+5
-2
@@ -113,13 +113,16 @@ public interface DBWServiceCore extends DBWService {
|
||||
@NotNull String connectionId,
|
||||
@NotNull Map<String, Object> authProperties,
|
||||
@Nullable List<WebNetworkHandlerConfigInput> networkCredentials,
|
||||
@Nullable Boolean saveCredentials) throws DBWebException;
|
||||
@Nullable Boolean saveCredentials,
|
||||
@Nullable Boolean sharedCredentials
|
||||
) throws DBWebException;
|
||||
|
||||
@WebProjectAction(requireProjectPermissions = {RMConstants.PERMISSION_PROJECT_DATASOURCES_EDIT})
|
||||
WebConnectionInfo createConnection(
|
||||
@NotNull WebSession webSession,
|
||||
@Nullable @WebObjectId String projectId,
|
||||
@NotNull WebConnectionConfig connectionConfig) throws DBWebException;
|
||||
@NotNull WebConnectionConfig connectionConfig
|
||||
) throws DBWebException;
|
||||
|
||||
@WebProjectAction(requireProjectPermissions = {RMConstants.PERMISSION_PROJECT_DATASOURCES_EDIT})
|
||||
WebConnectionInfo updateConnection(
|
||||
|
||||
+3
-1
@@ -134,7 +134,9 @@ public class WebServiceBindingCore extends WebServiceBindingBase<DBWServiceCore>
|
||||
env.getArgument("id"),
|
||||
env.getArgument("credentials"),
|
||||
nhc,
|
||||
env.getArgument("saveCredentials"));
|
||||
env.getArgument("saveCredentials"),
|
||||
env.getArgument("sharedCredentials")
|
||||
);
|
||||
}
|
||||
)
|
||||
.dataFetcher("testConnection", env -> getService(env).testConnection(
|
||||
|
||||
+66
-28
@@ -19,6 +19,7 @@ package io.cloudbeaver.service.core.impl;
|
||||
|
||||
import io.cloudbeaver.DBWConstants;
|
||||
import io.cloudbeaver.DBWebException;
|
||||
import io.cloudbeaver.WebProjectImpl;
|
||||
import io.cloudbeaver.WebServiceUtils;
|
||||
import io.cloudbeaver.events.CBEvent;
|
||||
import io.cloudbeaver.events.CBEventConstants;
|
||||
@@ -154,7 +155,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
getTemplateConnectionsFromProject(webSession, project, result);
|
||||
}
|
||||
} else {
|
||||
DBPProject project = webSession.getProjectById(projectId);
|
||||
DBPProject project = getProjectById(webSession, projectId);
|
||||
getTemplateConnectionsFromProject(webSession, project, result);
|
||||
}
|
||||
webSession.filterAccessibleConnections(result);
|
||||
@@ -189,7 +190,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
WebConnectionFolderInfo folderInfo = WebConnectionFolderUtils.getFolderInfo(webSession, projectId, id);
|
||||
return Collections.singletonList(folderInfo);
|
||||
}
|
||||
DBPProject project = webSession.getProjectById(projectId);
|
||||
DBPProject project = getProjectById(webSession, projectId);
|
||||
return getConnectionFoldersFromProject(webSession, project);
|
||||
}
|
||||
|
||||
@@ -308,8 +309,9 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
@NotNull String connectionId,
|
||||
@NotNull Map<String, Object> authProperties,
|
||||
@Nullable List<WebNetworkHandlerConfigInput> networkCredentials,
|
||||
@Nullable Boolean saveCredentials) throws DBWebException
|
||||
{
|
||||
@Nullable Boolean saveCredentials,
|
||||
@Nullable Boolean sharedCredentials
|
||||
) throws DBWebException {
|
||||
WebConnectionInfo connectionInfo = webSession.getWebConnectionInfo(projectId, connectionId);
|
||||
connectionInfo.setSavedCredentials(authProperties, networkCredentials);
|
||||
|
||||
@@ -349,7 +351,9 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
dataSourceContainer,
|
||||
dataSourceContainer.getConnectionConfiguration(),
|
||||
authProperties,
|
||||
true);
|
||||
true,
|
||||
sharedCredentials == null ? false : sharedCredentials
|
||||
);
|
||||
|
||||
WebDataSourceUtils.saveCredentialsInDataSource(connectionInfo, dataSourceContainer, dataSourceContainer.getConnectionConfiguration());
|
||||
saveConfig[0] = true;
|
||||
@@ -371,7 +375,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
@Nullable String projectId,
|
||||
@NotNull WebConnectionConfig connectionConfig
|
||||
) throws DBWebException {
|
||||
var project = webSession.getProjectById(projectId);
|
||||
var project = getProjectById(webSession, projectId);
|
||||
var rmProject = project.getRmProject();
|
||||
if (rmProject.getType() == RMProjectType.USER
|
||||
&& !webSession.hasPermission(DBWConstants.PERMISSION_ADMIN)
|
||||
@@ -380,7 +384,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
throw new DBWebException("New connection create is restricted by server configuration");
|
||||
}
|
||||
webSession.addInfoMessage("Create new connection");
|
||||
DBPDataSourceRegistry sessionRegistry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry sessionRegistry = project.getDataSourceRegistry();
|
||||
|
||||
// we don't need to save credentials for templates
|
||||
if (connectionConfig.isTemplate()) {
|
||||
@@ -404,7 +408,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
webSession.addConnection(connectionInfo);
|
||||
webSession.addInfoMessage("New connection was created - " + WebServiceUtils.getConnectionContainerInfo(newDataSource));
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
webSession.getProjectById(projectId),
|
||||
project,
|
||||
connectionInfo.getId(),
|
||||
CBEventConstants.EventType.TYPE_CREATE
|
||||
);
|
||||
@@ -421,7 +425,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
// if (!CBApplication.getInstance().getAppConfiguration().isSupportsCustomConnections()) {
|
||||
// throw new DBWebException("Connection edit is restricted by server configuration");
|
||||
// }
|
||||
DBPDataSourceRegistry sessionRegistry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry sessionRegistry = getProjectById(webSession, projectId).getDataSourceRegistry();
|
||||
|
||||
WebConnectionInfo connectionInfo = webSession.getWebConnectionInfo(projectId, config.getConnectionId());
|
||||
DBPDataSourceContainer dataSource = connectionInfo.getDataSourceContainer();
|
||||
@@ -437,7 +441,13 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
dataSource.setFolder(config.getFolder() != null ? sessionRegistry.getFolder(config.getFolder()) : null);
|
||||
|
||||
WebServiceUtils.setConnectionConfiguration(dataSource.getDriver(), dataSource.getConnectionConfiguration(), config);
|
||||
WebServiceUtils.saveAuthProperties(dataSource, dataSource.getConnectionConfiguration(), config.getCredentials(), config.isSaveCredentials());
|
||||
WebServiceUtils.saveAuthProperties(
|
||||
dataSource,
|
||||
dataSource.getConnectionConfiguration(),
|
||||
config.getCredentials(),
|
||||
config.isSaveCredentials(),
|
||||
config.isSharedCredentials()
|
||||
);
|
||||
|
||||
try {
|
||||
sessionRegistry.updateDataSource(dataSource);
|
||||
@@ -446,21 +456,22 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
throw new DBWebException("Failed to update connection", e);
|
||||
}
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
webSession.getProjectById(projectId), connectionInfo.getId(), CBEventConstants.EventType.TYPE_UPDATE);
|
||||
getProjectById(webSession, projectId), connectionInfo.getId(), CBEventConstants.EventType.TYPE_UPDATE);
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteConnection(
|
||||
@NotNull WebSession webSession, @Nullable String projectId, @NotNull String connectionId) throws DBWebException {
|
||||
@NotNull WebSession webSession, @Nullable String projectId, @NotNull String connectionId
|
||||
) throws DBWebException {
|
||||
WebConnectionInfo connectionInfo = webSession.getWebConnectionInfo(projectId, connectionId);
|
||||
if (connectionInfo.getDataSourceContainer().getProject() != webSession.getProjectById(projectId)) {
|
||||
if (connectionInfo.getDataSourceContainer().getProject() != getProjectById(webSession, projectId)) {
|
||||
throw new DBWebException("Global connection '" + connectionInfo.getName() + "' configuration cannot be deleted");
|
||||
}
|
||||
webSession.addInfoMessage("Delete connection - " +
|
||||
WebServiceUtils.getConnectionContainerInfo(connectionInfo.getDataSourceContainer()));
|
||||
closeAndDeleteConnection(webSession, projectId, connectionId, true);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(webSession.getProjectById(projectId), connectionId, CBEventConstants.EventType.TYPE_DELETE);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(getProjectById(webSession, projectId), connectionId, CBEventConstants.EventType.TYPE_DELETE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -471,7 +482,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
@NotNull String templateId,
|
||||
@Nullable String connectionName) throws DBWebException
|
||||
{
|
||||
DBPDataSourceRegistry templateRegistry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry templateRegistry = getProjectById(webSession, projectId).getDataSourceRegistry();
|
||||
DBPDataSourceContainer dataSourceTemplate = templateRegistry.getDataSource(templateId);
|
||||
if (dataSourceTemplate == null) {
|
||||
throw new DBWebException("Template data source '" + templateId + "' not found");
|
||||
@@ -507,7 +518,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
@NotNull WebConnectionConfig config) throws DBWebException {
|
||||
try {
|
||||
DBNModel navigatorModel = webSession.getNavigatorModel();
|
||||
DBPDataSourceRegistry dataSourceRegistry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry dataSourceRegistry = getProjectById(webSession, projectId).getDataSourceRegistry();
|
||||
|
||||
DBNNode srcNode = navigatorModel.getNodeByPath(webSession.getProgressMonitor(), nodePath);
|
||||
if (srcNode == null) {
|
||||
@@ -537,7 +548,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
dataSourceRegistry.checkForErrors();
|
||||
webSession.addConnection(connectionInfo);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
webSession.getProjectById(projectId), connectionInfo.getId(), CBEventConstants.EventType.TYPE_CREATE);
|
||||
getProjectById(webSession, projectId), connectionInfo.getId(), CBEventConstants.EventType.TYPE_CREATE);
|
||||
return connectionInfo;
|
||||
} catch (DBException e) {
|
||||
throw new DBWebException("Error copying connection", e);
|
||||
@@ -555,12 +566,30 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
DBPDataSourceContainer dataSource = WebDataSourceUtils.getLocalOrGlobalDataSource(
|
||||
CBApplication.getInstance(), webSession, projectId, connectionId);
|
||||
|
||||
DBPDataSourceRegistry sessionRegistry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
WebProjectImpl project = getProjectById(webSession, projectId);
|
||||
DBPDataSourceRegistry sessionRegistry = project.getDataSourceRegistry();
|
||||
DBPDataSourceContainer testDataSource;
|
||||
if (dataSource != null) {
|
||||
try {
|
||||
// Check that creds are saved to trigger secrets resolve
|
||||
dataSource.isCredentialsSaved();
|
||||
} catch (DBException e) {
|
||||
throw new DBWebException("Can't determine whether datasource credentials are saved", e);
|
||||
}
|
||||
|
||||
testDataSource = dataSource.createCopy(dataSource.getRegistry());
|
||||
WebServiceUtils.setConnectionConfiguration(testDataSource.getDriver(), testDataSource.getConnectionConfiguration(), connectionConfig);
|
||||
WebServiceUtils.saveAuthProperties(testDataSource, testDataSource.getConnectionConfiguration(), connectionConfig.getCredentials(), true);
|
||||
WebServiceUtils.setConnectionConfiguration(
|
||||
testDataSource.getDriver(),
|
||||
testDataSource.getConnectionConfiguration(),
|
||||
connectionConfig
|
||||
);
|
||||
WebServiceUtils.saveAuthProperties(
|
||||
testDataSource,
|
||||
testDataSource.getConnectionConfiguration(),
|
||||
connectionConfig.getCredentials(),
|
||||
true,
|
||||
false
|
||||
);
|
||||
} else {
|
||||
testDataSource = WebServiceUtils.createConnectionFromConfig(connectionConfig, sessionRegistry);
|
||||
}
|
||||
@@ -664,7 +693,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
//new DisconnectJob(connectionInfo.getDataSource()).schedule();
|
||||
}
|
||||
if (forceDelete) {
|
||||
DBPDataSourceRegistry registry = webSession.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry registry = getProjectById(webSession, projectId).getDataSourceRegistry();
|
||||
registry.removeDataSource(dataSourceContainer);
|
||||
try {
|
||||
registry.checkForErrors();
|
||||
@@ -712,12 +741,13 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
if (parentPath != null) {
|
||||
parentNode = WebConnectionFolderUtils.getFolderInfo(session, projectId, parentPath);
|
||||
}
|
||||
DBPDataSourceRegistry sessionRegistry = session.getProjectById(projectId).getDataSourceRegistry();
|
||||
WebProjectImpl project = getProjectById(session, projectId);
|
||||
DBPDataSourceRegistry sessionRegistry = project.getDataSourceRegistry();
|
||||
DBPDataSourceFolder newFolder = WebServiceUtils.createFolder(parentNode, folderName, sessionRegistry);
|
||||
WebConnectionFolderInfo folderInfo = new WebConnectionFolderInfo(session, newFolder);
|
||||
WebServiceUtils.updateConfigAndRefreshDatabases(session, projectId);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
session.getProjectById(projectId), folderInfo.getId(), CBEventConstants.EventType.TYPE_CREATE);
|
||||
project, folderInfo.getId(), CBEventConstants.EventType.TYPE_CREATE);
|
||||
return folderInfo;
|
||||
} catch (DBException e) {
|
||||
throw new DBWebException(e.getMessage(), e);
|
||||
@@ -736,7 +766,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
folderInfo.getDataSourceFolder().setName(newName);
|
||||
WebServiceUtils.updateConfigAndRefreshDatabases(session, projectId);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
session.getProjectById(projectId), folderInfo.getId(), CBEventConstants.EventType.TYPE_UPDATE);
|
||||
getProjectById(session, projectId), folderInfo.getId(), CBEventConstants.EventType.TYPE_UPDATE);
|
||||
return folderInfo;
|
||||
}
|
||||
|
||||
@@ -747,15 +777,16 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
try {
|
||||
WebConnectionFolderInfo folderInfo = WebConnectionFolderUtils.getFolderInfo(session, projectId, folderPath);
|
||||
DBPDataSourceFolder folder = folderInfo.getDataSourceFolder();
|
||||
if (folder.getDataSourceRegistry().getProject() != session.getProjectById(projectId)) {
|
||||
WebProjectImpl project = getProjectById(session, projectId);
|
||||
if (folder.getDataSourceRegistry().getProject() != project) {
|
||||
throw new DBWebException("Global folder '" + folderInfo.getId() + "' cannot be deleted");
|
||||
}
|
||||
session.addInfoMessage("Delete folder");
|
||||
DBPDataSourceRegistry sessionRegistry = session.getProjectById(projectId).getDataSourceRegistry();
|
||||
DBPDataSourceRegistry sessionRegistry = project.getDataSourceRegistry();
|
||||
sessionRegistry.removeFolder(folderInfo.getDataSourceFolder(), false);
|
||||
WebServiceUtils.updateConfigAndRefreshDatabases(session, projectId);
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
session.getProjectById(projectId), folderInfo.getId(), CBEventConstants.EventType.TYPE_DELETE);
|
||||
project, folderInfo.getId(), CBEventConstants.EventType.TYPE_DELETE);
|
||||
} catch (DBException e) {
|
||||
throw new DBWebException(e.getMessage(), e);
|
||||
}
|
||||
@@ -771,7 +802,7 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
dataSourceDescriptor.setNavigatorSettings(settings);
|
||||
dataSourceDescriptor.persistConfiguration();
|
||||
WebAppUtils.addDataSourceUpdatedEvent(
|
||||
webSession.getProjectById(projectId), id, CBEventConstants.EventType.TYPE_UPDATE);
|
||||
getProjectById(webSession, projectId), id, CBEventConstants.EventType.TYPE_UPDATE);
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
@@ -785,4 +816,11 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
return webSession.asyncTaskCancel(taskId);
|
||||
}
|
||||
|
||||
private WebProjectImpl getProjectById(WebSession webSession, String projectId) throws DBWebException {
|
||||
WebProjectImpl project = webSession.getProjectById(projectId);
|
||||
if (project == null) {
|
||||
throw new DBWebException("Project '" + projectId + "' not found");
|
||||
}
|
||||
return project;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true
|
||||
Bundle-Version: 1.0.60.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.61.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.admin</artifactId>
|
||||
<version>1.0.60-SNAPSHOT</version>
|
||||
<version>1.0.61-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -50,6 +50,8 @@ type AdminTeamInfo {
|
||||
teamName: String
|
||||
description: String
|
||||
|
||||
metaParameters: Object!
|
||||
|
||||
grantedUsers: [ID!]!
|
||||
grantedConnections: [AdminConnectionGrantInfo!]!
|
||||
|
||||
@@ -120,6 +122,7 @@ extend type Query {
|
||||
listTeams(teamId: ID): [AdminTeamInfo!]!
|
||||
listPermissions: [AdminPermissionInfo!]!
|
||||
listAuthRoles: [String!]!
|
||||
listTeamMetaParameters: [ObjectPropertyInfo!]!
|
||||
|
||||
createUser(userId: ID!, enabled: Boolean!, authRole: String): AdminUserInfo!
|
||||
deleteUser(userId: ID!): Boolean
|
||||
@@ -179,6 +182,8 @@ extend type Query {
|
||||
|
||||
setUserMetaParameterValues(userId: ID!, parameters: Object!): Boolean!
|
||||
|
||||
setTeamMetaParameterValues(teamId: ID!, parameters: Object!): Boolean!
|
||||
|
||||
#### Global configuration
|
||||
|
||||
configureServer(configuration: ServerConfigInput!): Boolean!
|
||||
|
||||
+9
@@ -25,6 +25,7 @@ import org.jkiss.dbeaver.model.security.user.SMTeam;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Web team info
|
||||
@@ -45,14 +46,22 @@ public class AdminTeamInfo {
|
||||
return team.getTeamId();
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getTeamName() {
|
||||
return team.getName();
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getDescription() {
|
||||
return team.getDescription();
|
||||
}
|
||||
|
||||
@Property
|
||||
public Map<String, String> getMetaParameters() {
|
||||
return team.getMetaParameters();
|
||||
}
|
||||
|
||||
@Property
|
||||
public List<String> getTeamPermissions() {
|
||||
return teamPermissions;
|
||||
}
|
||||
|
||||
+5
@@ -50,6 +50,9 @@ public interface DBWServiceAdmin extends DBWService {
|
||||
@NotNull
|
||||
List<AdminPermissionInfo> listPermissions(@NotNull WebSession webSession) throws DBWebException;
|
||||
|
||||
@WebAction()
|
||||
WebPropertyInfo[] listTeamMetaParameters(@NotNull WebSession webSession);
|
||||
|
||||
@WebAction(requirePermissions = DBWConstants.PERMISSION_ADMIN)
|
||||
@NotNull
|
||||
AdminUserInfo createUser(
|
||||
@@ -164,6 +167,8 @@ public interface DBWServiceAdmin extends DBWService {
|
||||
@WebAction(requirePermissions = DBWConstants.PERMISSION_ADMIN)
|
||||
Boolean setUserMetaParameterValues(WebSession webSession, String userId, Map<String, String> parameters) throws DBWebException;
|
||||
@WebAction(requirePermissions = DBWConstants.PERMISSION_ADMIN)
|
||||
Boolean setTeamMetaParameterValues(WebSession webSession, String teamId, Map<String, String> parameters) throws DBWebException;
|
||||
@WebAction(requirePermissions = DBWConstants.PERMISSION_ADMIN)
|
||||
Boolean enableUser(WebSession webSession, String userId, Boolean enabled) throws DBWebException;
|
||||
|
||||
@WebAction(requirePermissions = DBWConstants.PERMISSION_ADMIN)
|
||||
|
||||
+7
@@ -50,6 +50,8 @@ public class WebServiceBindingAdmin extends WebServiceBindingBase<DBWServiceAdmi
|
||||
env -> getService(env).listPermissions(getWebSession(env)))
|
||||
.dataFetcher("listAuthRoles",
|
||||
env -> getService(env).listAuthRoles())
|
||||
.dataFetcher("listTeamMetaParameters",
|
||||
env -> getService(env).listTeamMetaParameters(getWebSession(env)))
|
||||
.dataFetcher("createUser",
|
||||
env -> getService(env).createUser(
|
||||
getWebSession(env),
|
||||
@@ -143,6 +145,11 @@ public class WebServiceBindingAdmin extends WebServiceBindingBase<DBWServiceAdmi
|
||||
getWebSession(env),
|
||||
env.getArgument("userId"),
|
||||
env.getArgument("parameters")))
|
||||
.dataFetcher("setTeamMetaParameterValues",
|
||||
env -> getService(env).setTeamMetaParameterValues(
|
||||
getWebSession(env),
|
||||
env.getArgument("teamId"),
|
||||
env.getArgument("parameters")))
|
||||
|
||||
.dataFetcher("configureServer",
|
||||
env -> getService(env).configureServer(getWebSession(env), env.getArgument("configuration")))
|
||||
|
||||
+31
-4
@@ -41,10 +41,8 @@ import org.jkiss.dbeaver.model.DBPDataSourceContainer;
|
||||
import org.jkiss.dbeaver.model.app.DBPDataSourceRegistry;
|
||||
import org.jkiss.dbeaver.model.app.DBPProject;
|
||||
import org.jkiss.dbeaver.model.navigator.DBNBrowseSettings;
|
||||
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
|
||||
import org.jkiss.dbeaver.model.security.SMConstants;
|
||||
import org.jkiss.dbeaver.model.security.SMDataSourceGrant;
|
||||
import org.jkiss.dbeaver.model.security.SMObjects;
|
||||
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
|
||||
import org.jkiss.dbeaver.model.security.*;
|
||||
import org.jkiss.dbeaver.model.security.user.SMTeam;
|
||||
import org.jkiss.dbeaver.model.security.user.SMUser;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
@@ -113,6 +111,25 @@ public class WebServiceAdmin implements DBWServiceAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebPropertyInfo[] listTeamMetaParameters(@NotNull WebSession webSession) {
|
||||
// First add user profile properties
|
||||
List<DBPPropertyDescriptor> props = new ArrayList<>(
|
||||
WebMetaParametersRegistry.getInstance().getTeamParameters());
|
||||
|
||||
// Add metas from enabled auth providers
|
||||
for (WebAuthProviderDescriptor ap : WebServiceUtils.getEnabledAuthProviders()) {
|
||||
List<DBPPropertyDescriptor> metaProps = ap.getMetaParameters(SMSubjectType.team);
|
||||
if (!CommonUtils.isEmpty(metaProps)) {
|
||||
props.addAll(metaProps);
|
||||
}
|
||||
}
|
||||
|
||||
return props.stream()
|
||||
.map(p -> new WebPropertyInfo(webSession, p, null))
|
||||
.toArray(WebPropertyInfo[]::new);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public AdminUserInfo createUser(
|
||||
@@ -657,6 +674,16 @@ public class WebServiceAdmin implements DBWServiceAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean setTeamMetaParameterValues(WebSession webSession, String teamId, Map<String, String> parameters) throws DBWebException {
|
||||
try {
|
||||
webSession.getAdminSecurityController().setSubjectMetas(teamId, parameters);
|
||||
return true;
|
||||
} catch (DBException e) {
|
||||
throw new DBWebException("Error changing team '" + teamId + "' meta parameters", e);
|
||||
}
|
||||
}
|
||||
|
||||
private DBPDataSourceRegistry getDataSourceRegistry(WebSession session, String projectId) throws DBWebException {
|
||||
WebProjectImpl project = session.getProjectById(projectId);
|
||||
if (project == null) {
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true
|
||||
Bundle-Version: 1.0.60.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.61.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -3,21 +3,18 @@
|
||||
|
||||
<plugin>
|
||||
|
||||
<extension-point id="io.cloudbeaver.userProfile" name="User profiles" schema="schema/io.cloudbeaver.userProfile.exsd"/>
|
||||
|
||||
<extension point="io.cloudbeaver.service">
|
||||
<service id="auth" label="User authentication" description="User authentication services" class="io.cloudbeaver.service.auth.WebServiceBindingAuth">
|
||||
|
||||
</service>
|
||||
</extension>
|
||||
|
||||
<extension point="io.cloudbeaver.userProfile">
|
||||
<userProfileProperties>
|
||||
<extension point="io.cloudbeaver.metaParameters">
|
||||
<metaParameters type="user">
|
||||
<propertyGroup label="Main">
|
||||
<property id="firstName" label="First Name" type="string" description="User first name"/>
|
||||
<property id="lastName" label="Last Name" type="string" description="User last name"/>
|
||||
</propertyGroup>
|
||||
</userProfileProperties>
|
||||
</metaParameters>
|
||||
</extension>
|
||||
<extension point="io.cloudbeaver.handler">
|
||||
<sessionHandler id="RPSessionHandler" class="io.cloudbeaver.service.auth.RPSessionHandler"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.auth</artifactId>
|
||||
<version>1.0.60-SNAPSHOT</version>
|
||||
<version>1.0.61-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -109,16 +109,19 @@ type UserInfo {
|
||||
|
||||
# Human readable display name. It is taken from the first auth provider which was used for user login.
|
||||
displayName: String
|
||||
# User auth role ID. Optional.
|
||||
authRole: ID
|
||||
|
||||
# All authentication tokens used during current session
|
||||
authTokens: [UserAuthToken!]!
|
||||
|
||||
linkedAuthProviders: [String!]!
|
||||
|
||||
# User profile properties map
|
||||
metaParameters: Object!
|
||||
|
||||
# USer configuiraiton parameters
|
||||
# User configuration parameters
|
||||
configurationParameters: Object!
|
||||
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
|
||||
+5
@@ -54,6 +54,11 @@ public class WebUserInfo {
|
||||
return user == null ? null : user.getDisplayName();
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getAuthRole() {
|
||||
return user == null ? null : user.getAuthRole();
|
||||
}
|
||||
|
||||
@Property
|
||||
public List<WebUserAuthToken> getAuthTokens() {
|
||||
return session.getAllAuthInfo().stream()
|
||||
|
||||
+4
-5
@@ -27,7 +27,7 @@ import io.cloudbeaver.model.user.WebAuthProviderInfo;
|
||||
import io.cloudbeaver.model.user.WebUser;
|
||||
import io.cloudbeaver.registry.WebAuthProviderDescriptor;
|
||||
import io.cloudbeaver.registry.WebAuthProviderRegistry;
|
||||
import io.cloudbeaver.registry.WebUserProfileRegistry;
|
||||
import io.cloudbeaver.registry.WebMetaParametersRegistry;
|
||||
import io.cloudbeaver.server.CBApplication;
|
||||
import io.cloudbeaver.service.auth.DBWServiceAuth;
|
||||
import io.cloudbeaver.service.auth.WebAuthStatus;
|
||||
@@ -191,14 +191,13 @@ public class WebServiceAuthImpl implements DBWServiceAuth {
|
||||
|
||||
@Override
|
||||
public WebPropertyInfo[] listUserProfileProperties(@NotNull WebSession webSession) {
|
||||
List<DBPPropertyDescriptor> props = new ArrayList<>();
|
||||
|
||||
// First add user profile properties
|
||||
props.addAll(WebUserProfileRegistry.getInstance().getProperties());
|
||||
List<DBPPropertyDescriptor> props = new ArrayList<>(
|
||||
WebMetaParametersRegistry.getInstance().getUserParameters());
|
||||
|
||||
// Add metas from enabled auth providers
|
||||
for (WebAuthProviderDescriptor ap : WebServiceUtils.getEnabledAuthProviders()) {
|
||||
List<DBPPropertyDescriptor> metaProps = ap.getMetaProperties(SMSubjectType.user);
|
||||
List<DBPPropertyDescriptor> metaProps = ap.getMetaParameters(SMSubjectType.user);
|
||||
if (!CommonUtils.isEmpty(metaProps)) {
|
||||
props.addAll(metaProps);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true
|
||||
Bundle-Version: 1.0.61.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.62.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.data.transfer</artifactId>
|
||||
<version>1.0.61-SNAPSHOT</version>
|
||||
<version>1.0.62-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true
|
||||
Bundle-Version: 1.0.64.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.65.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.metadata</artifactId>
|
||||
<version>1.0.64-SNAPSHOT</version>
|
||||
<version>1.0.65-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true
|
||||
Bundle-Version: 1.0.13.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.14.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.rm</artifactId>
|
||||
<version>1.0.13-SNAPSHOT</version>
|
||||
<version>1.0.14-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
|
||||
Bundle-Vendor: DBeaver Security Sevice
|
||||
Bundle-Vendor: DBeaver Corp
|
||||
Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true
|
||||
Bundle-Version: 1.0.16.qualifier
|
||||
Bundle-Release-Date: 20221107
|
||||
Bundle-Version: 1.0.17.qualifier
|
||||
Bundle-Release-Date: 20221121
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.service.security</artifactId>
|
||||
<version>1.0.16-SNAPSHOT</version>
|
||||
<version>1.0.17-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -44,11 +44,11 @@ import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
|
||||
import org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCTransaction;
|
||||
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
|
||||
import org.jkiss.dbeaver.model.runtime.LoggingProgressMonitor;
|
||||
import org.jkiss.dbeaver.model.security.*;
|
||||
import org.jkiss.dbeaver.model.security.exception.SMAccessTokenExpiredException;
|
||||
import org.jkiss.dbeaver.model.security.exception.SMException;
|
||||
import org.jkiss.dbeaver.model.security.exception.SMRefreshTokenExpiredException;
|
||||
import org.jkiss.dbeaver.model.security.user.*;
|
||||
import org.jkiss.dbeaver.model.security.*;
|
||||
import org.jkiss.dbeaver.runtime.DBWorkbench;
|
||||
import org.jkiss.utils.ArrayUtils;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ package io.cloudbeaver.service.security.internal;
|
||||
|
||||
import org.jkiss.code.NotNull;
|
||||
import org.jkiss.code.Nullable;
|
||||
import org.jkiss.dbeaver.model.security.SMSessionType;
|
||||
import org.jkiss.dbeaver.model.auth.SMSessionType;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="io.cloudbeaver.ce.drivers.feature"
|
||||
label="Cloudbeaver CE 3rd Party Drivers"
|
||||
version="1.0.84.qualifier"
|
||||
version="1.0.85.qualifier"
|
||||
provider-name="DBeaver Corp">
|
||||
|
||||
<plugin id="io.cloudbeaver.resources.drivers.base" download-size="0" install-size="0" version="0.0.0"/>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.ce.drivers.feature</artifactId>
|
||||
<version>1.0.84-SNAPSHOT</version>
|
||||
<version>1.0.85-SNAPSHOT</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="io.cloudbeaver.product.ce.feature"
|
||||
label="%featureName"
|
||||
version="22.2.4.qualifier"
|
||||
version="22.2.5.qualifier"
|
||||
provider-name="%providerName"
|
||||
plugin="io.cloudbeaver.product.ce">
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.product.ce.feature</artifactId>
|
||||
<version>22.2.4-SNAPSHOT</version>
|
||||
<version>22.2.5-SNAPSHOT</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="io.cloudbeaver.server.feature"
|
||||
label="%featureName"
|
||||
version="22.2.4.qualifier"
|
||||
version="22.2.5.qualifier"
|
||||
provider-name="%providerName"
|
||||
plugin="io.cloudbeaver.server">
|
||||
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.server.feature</artifactId>
|
||||
<version>22.2.4-SNAPSHOT</version>
|
||||
<version>22.2.5-SNAPSHOT</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="io.cloudbeaver.ws.feature"
|
||||
label="%featureName"
|
||||
version="1.0.14.qualifier"
|
||||
version="1.0.15.qualifier"
|
||||
provider-name="%providerName"
|
||||
plugin="io.cloudbeaver.model">
|
||||
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>io.cloudbeaver.ws.feature</artifactId>
|
||||
<version>1.0.14-SNAPSHOT</version>
|
||||
<version>1.0.15-SNAPSHOT</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
<properties>
|
||||
<dbeaver-product>CloudBeaver CE</dbeaver-product>
|
||||
<dbeaver-version>22.2.4</dbeaver-version>
|
||||
<dbeaver-version>22.2.5</dbeaver-version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<?pde version="3.5"?>
|
||||
|
||||
<product name="CloudBeaver ce Server" uid="io.cloudbeaver.product" id="io.cloudbeaver.product.ce.product"
|
||||
application="io.cloudbeaver.product.ce.application" version="22.2.4.qualifier" useFeatures="true"
|
||||
application="io.cloudbeaver.product.ce.application" version="22.2.5.qualifier" useFeatures="true"
|
||||
includeLaunchers="false">
|
||||
|
||||
<configIni use="default">
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<setEntry value="io.cloudbeaver.ee.drivers.feature:default"/>
|
||||
<setEntry value="io.cloudbeaver.product.ce.feature:default"/>
|
||||
<setEntry value="io.cloudbeaver.product.ee.feature:default"/>
|
||||
<setEntry value="io.cloudbeaver.sample.feature:default"/>
|
||||
<setEntry value="io.cloudbeaver.server.feature:default"/>
|
||||
<setEntry value="org.jkiss.dbeaver.db.feature:default"/>
|
||||
<setEntry value="org.jkiss.dbeaver.runtime.feature:default"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
<version>22.2.4-SNAPSHOT</version>
|
||||
<version>22.2.5-SNAPSHOT</version>
|
||||
<artifactId>web-server</artifactId>
|
||||
<packaging>eclipse-repository</packaging>
|
||||
<name>Cloudbeaver Server Product</name>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2022 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { SessionResource } from '@cloudbeaver/core-root';
|
||||
import { CachedDataResource, GraphQLService, ObjectPropertyInfo } from '@cloudbeaver/core-sdk';
|
||||
|
||||
export type TeamMetaParameter = ObjectPropertyInfo;
|
||||
|
||||
@injectable()
|
||||
export class TeamMetaParametersResource extends CachedDataResource<TeamMetaParameter[]> {
|
||||
constructor(
|
||||
private readonly graphQLService: GraphQLService,
|
||||
sessionResource: SessionResource,
|
||||
) {
|
||||
super([]);
|
||||
|
||||
this.sync(sessionResource, () => { }, () => { });
|
||||
}
|
||||
|
||||
protected async loader(): Promise<TeamMetaParameter[]> {
|
||||
const { parameters } = await this.graphQLService.sdk.getTeamMetaParameters();
|
||||
return parameters;
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,20 @@ import {
|
||||
ResourceKeyUtils,
|
||||
AdminTeamInfoFragment,
|
||||
AdminConnectionGrantInfo,
|
||||
CachedMapAllKey
|
||||
CachedMapAllKey,
|
||||
GetTeamsListQueryVariables
|
||||
} from '@cloudbeaver/core-sdk';
|
||||
import { isArraysEqual } from '@cloudbeaver/core-utils';
|
||||
|
||||
const NEW_TEAM_SYMBOL = Symbol('new-team');
|
||||
|
||||
export type TeamInfo = AdminTeamInfoFragment;
|
||||
|
||||
type TeamResourceIncludes = Omit<GetTeamsListQueryVariables, 'teamId'>;
|
||||
type NewTeam = TeamInfo & { [NEW_TEAM_SYMBOL]: boolean; timestamp: number };
|
||||
|
||||
@injectable()
|
||||
export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
export class TeamsResource extends CachedMapResource<string, TeamInfo, TeamResourceIncludes> {
|
||||
constructor(private readonly graphQLService: GraphQLService) {
|
||||
super();
|
||||
}
|
||||
@@ -41,8 +44,20 @@ export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
async createTeam(teamInfo: TeamInfo): Promise<TeamInfo> {
|
||||
const response = await this.graphQLService.sdk.createTeam(teamInfo);
|
||||
async createTeam({
|
||||
teamId,
|
||||
teamPermissions,
|
||||
teamName,
|
||||
description,
|
||||
metaParameters,
|
||||
}: TeamInfo): Promise<TeamInfo> {
|
||||
const response = await this.graphQLService.sdk.createTeam({
|
||||
teamId,
|
||||
teamName,
|
||||
description,
|
||||
...this.getDefaultIncludes(),
|
||||
...this.getIncludesMap(teamId),
|
||||
});
|
||||
|
||||
const newTeam: NewTeam = {
|
||||
...response.team,
|
||||
@@ -52,19 +67,35 @@ export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
|
||||
this.updateTeams(newTeam);
|
||||
|
||||
await this.setSubjectPermissions(newTeam.teamId, teamInfo.teamPermissions);
|
||||
await this.setMetaParameters(newTeam.teamId, metaParameters);
|
||||
await this.setSubjectPermissions(newTeam.teamId, teamPermissions);
|
||||
|
||||
return this.get(teamInfo.teamId)!;
|
||||
return this.get(teamId)!;
|
||||
}
|
||||
|
||||
async updateTeam(teamInfo: TeamInfo): Promise<TeamInfo> {
|
||||
const { team } = await this.graphQLService.sdk.updateTeam(teamInfo);
|
||||
async updateTeam({
|
||||
teamId,
|
||||
teamPermissions,
|
||||
teamName,
|
||||
description,
|
||||
metaParameters,
|
||||
}: TeamInfo): Promise<TeamInfo> {
|
||||
const { team } = await this.graphQLService.sdk.updateTeam({
|
||||
teamId,
|
||||
teamName,
|
||||
description,
|
||||
...this.getDefaultIncludes(),
|
||||
...this.getIncludesMap(teamId),
|
||||
});
|
||||
|
||||
this.updateTeams(team);
|
||||
|
||||
await this.setSubjectPermissions(team.teamId, teamInfo.teamPermissions);
|
||||
await this.setMetaParameters(team.teamId, metaParameters);
|
||||
await this.setSubjectPermissions(team.teamId, teamPermissions);
|
||||
|
||||
return this.get(teamInfo.teamId)!;
|
||||
this.markOutdated(team.teamId);
|
||||
|
||||
return this.get(teamId)!;
|
||||
}
|
||||
|
||||
async deleteTeam(key: ResourceKey<string>): Promise<Map<string, TeamInfo>> {
|
||||
@@ -103,11 +134,15 @@ export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
team.teamPermissions = newPermissions.map(permission => permission.id);
|
||||
} else {
|
||||
// TODO: update permissions for team instead
|
||||
await this.loader(subjectId);
|
||||
await this.loader(subjectId, []);
|
||||
}
|
||||
}
|
||||
|
||||
protected async loader(key: ResourceKey<string>): Promise<Map<string, TeamInfo>> {
|
||||
async setMetaParameters(teamId: string, parameters: Record<string, any>): Promise<void> {
|
||||
await this.graphQLService.sdk.saveTeamMetaParameters({ teamId, parameters });
|
||||
}
|
||||
|
||||
protected async loader(key: ResourceKey<string>, includes: string[] | undefined): Promise<Map<string, TeamInfo>> {
|
||||
const all = ResourceKeyUtils.includes(key, CachedMapAllKey);
|
||||
|
||||
await ResourceKeyUtils.forEachAsync(all ? CachedMapAllKey : key, async key => {
|
||||
@@ -115,9 +150,12 @@ export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
|
||||
const { teams } = await this.graphQLService.sdk.getTeamsList({
|
||||
teamId,
|
||||
...this.getDefaultIncludes(),
|
||||
...this.getIncludesMap(teamId, includes),
|
||||
});
|
||||
|
||||
if (all) {
|
||||
this.resetIncludes();
|
||||
this.data.clear();
|
||||
}
|
||||
|
||||
@@ -141,6 +179,12 @@ export class TeamsResource extends CachedMapResource<string, TeamInfo> {
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
private getDefaultIncludes(): TeamResourceIncludes {
|
||||
return {
|
||||
includeMetaParameters: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function isNewTeam(team: TeamInfo | NewTeam): team is NewTeam {
|
||||
|
||||
@@ -16,3 +16,4 @@ export * from './UserDataService';
|
||||
export * from './UserInfoResource';
|
||||
export * from './UserMetaParametersResource';
|
||||
export * from './UsersResource';
|
||||
export * from './TeamMetaParametersResource';
|
||||
@@ -16,6 +16,7 @@ import { AuthProviderService } from './AuthProviderService';
|
||||
import { AuthProvidersResource } from './AuthProvidersResource';
|
||||
import { AuthRolesResource } from './AuthRolesResource';
|
||||
import { AuthSettingsService } from './AuthSettingsService';
|
||||
import { TeamMetaParametersResource } from './TeamMetaParametersResource';
|
||||
import { TeamsManagerService } from './TeamsManagerService';
|
||||
import { TeamsResource } from './TeamsResource';
|
||||
import { UserConfigurationBootstrap } from './UserConfigurationBootstrap';
|
||||
@@ -45,5 +46,6 @@ export const manifest: PluginManifest = {
|
||||
UserMetaParametersResource,
|
||||
UserConfigurationBootstrap,
|
||||
AuthRolesResource,
|
||||
TeamMetaParametersResource,
|
||||
],
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ import type { IConnectionInfoParams } from './IConnectionsResource';
|
||||
export type Connection = DatabaseConnection & {
|
||||
authProperties?: UserConnectionAuthPropertiesFragment[];
|
||||
};
|
||||
export type ConnectionInitConfig = Omit<InitConnectionMutationVariables, 'includeOrigin' | 'customIncludeOriginDetails' | 'includeAuthProperties' | 'customIncludeNetworkHandlerCredentials'>;
|
||||
export type ConnectionInitConfig = Omit<InitConnectionMutationVariables, 'includeOrigin' | 'customIncludeOriginDetails' | 'includeAuthProperties' | 'customIncludeNetworkHandlerCredentials' | 'includeAuthNeeded' | 'includeCredentialsSaved'>;
|
||||
export type ConnectionInfoIncludes = Omit<GetUserConnectionsQueryVariables, 'id'>;
|
||||
|
||||
export const NEW_CONNECTION_SYMBOL = Symbol('new-connection');
|
||||
@@ -477,6 +477,8 @@ export class ConnectionInfoResource
|
||||
customIncludeOriginDetails: false,
|
||||
includeAuthProperties: false,
|
||||
includeOrigin: true,
|
||||
includeAuthNeeded: false,
|
||||
includeCredentialsSaved: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ export default [
|
||||
['connections_connection_create_custom', 'Custom'],
|
||||
['connections_connection_create_search_database', 'Search'],
|
||||
['connections_connection_edit_save_credentials', 'Save credentials'],
|
||||
['connections_connection_share_credentials', 'Share credentials'],
|
||||
['connections_connection_share_credentials_tooltip', 'Share credentials across all users'],
|
||||
['connections_connection_credentials_provisioning', 'Authentication credentials'],
|
||||
['connections_connection_credentials_provisioning_description', 'You need to fill in or confirm the credentials to test this connection'],
|
||||
['connections_connection_edit_authentication', 'Authentication'],
|
||||
|
||||
@@ -21,6 +21,8 @@ export default [
|
||||
['connections_connection_create_custom', 'Custom'],
|
||||
['connections_connection_create_search_database', 'Cerca'],
|
||||
['connections_connection_edit_save_credentials', 'Salva le credenziali'],
|
||||
['connections_connection_share_credentials', 'Share credentials'],
|
||||
['connections_connection_share_credentials_tooltip', 'Share credentials across all users'],
|
||||
['connections_connection_credentials_provisioning', 'Credenziali di autenticazione'],
|
||||
['connections_connection_credentials_provisioning_description', 'Devi compilare o confermare le credenziali per provare questa connessione'],
|
||||
['connections_connection_edit_authentication', 'Autenticazione'],
|
||||
|
||||
@@ -20,6 +20,8 @@ export default [
|
||||
['connections_connection_create_custom', 'Настроить'],
|
||||
['connections_connection_create_search_database', 'Найти'],
|
||||
['connections_connection_edit_save_credentials', ' Запомнить данные'],
|
||||
['connections_connection_share_credentials', 'Запомнить данные для всех пользователей'],
|
||||
['connections_connection_share_credentials_tooltip', 'Запомнить данные для всех пользователей'],
|
||||
['connections_connection_credentials_provisioning', 'Аутентификационные данные'],
|
||||
['connections_connection_credentials_provisioning_description', 'Чтобы проверить подключение, необходимо заполнить или подтвердить данные доступа'],
|
||||
['connections_connection_edit_authentication', 'Авторизация'],
|
||||
|
||||
@@ -22,6 +22,8 @@ export default [
|
||||
['connections_connection_create_custom', '自定义'],
|
||||
['connections_connection_create_search_database', '搜索'],
|
||||
['connections_connection_edit_save_credentials', '保存凭据'],
|
||||
['connections_connection_share_credentials', 'Share credentials'],
|
||||
['connections_connection_share_credentials_tooltip', 'Share credentials across all users'],
|
||||
['connections_connection_credentials_provisioning', '认证凭据'],
|
||||
['connections_connection_credentials_provisioning_description', '您却要填写或确认凭据以测试此连接。'],
|
||||
['connections_connection_edit_authentication', '认证'],
|
||||
|
||||
@@ -174,6 +174,10 @@ export class NavNodeManagerService extends Bootstrap {
|
||||
}
|
||||
|
||||
async canOpen(nodeId: string, parentId: string, folderId?: string): Promise<boolean> {
|
||||
if (!this.navTree.has(nodeId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const contexts = await this.navigator.execute({
|
||||
type: NavigationType.canOpen,
|
||||
nodeId,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
query createTeam($teamId: ID!, $teamName: String, $description: String ) {
|
||||
query createTeam($teamId: ID!, $teamName: String, $description: String, $includeMetaParameters: Boolean!) {
|
||||
team: createTeam(teamId: $teamId, teamName: $teamName, description: $description) {
|
||||
...AdminTeamInfo
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
query getTeamMetaParameters {
|
||||
parameters: listTeamMetaParameters {
|
||||
...ObjectPropertyInfo
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
query getTeamsList($teamId: ID) {
|
||||
query getTeamsList($teamId: ID, $includeMetaParameters: Boolean!) {
|
||||
teams: listTeams(teamId: $teamId) {
|
||||
...AdminTeamInfo
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
query saveTeamMetaParameters(
|
||||
$teamId: ID!
|
||||
$parameters: Object!
|
||||
) {
|
||||
setTeamMetaParameterValues(
|
||||
teamId: $teamId,
|
||||
parameters: $parameters
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
query updateTeam($teamId: ID!, $teamName: String, $description: String ) {
|
||||
query updateTeam($teamId: ID!, $teamName: String, $description: String, $includeMetaParameters: Boolean!) {
|
||||
team: updateTeam(teamId: $teamId, teamName: $teamName, description: $description) {
|
||||
...AdminTeamInfo
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ mutation closeConnection(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: closeConnection(projectId: $projectId, id: $connectionId) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -6,6 +6,8 @@ mutation createConnection(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: createConnection(projectId: $projectId, config: $config) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -7,6 +7,8 @@ mutation createConnectionFromNode(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: copyConnectionFromNode(projectId: $projectId, nodePath: $nodePath, config: $config) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -7,6 +7,8 @@ mutation createConnectionFromTemplate(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: createConnectionFromTemplate(projectId: $projectId, templateId: $templateId, connectionName: $connectionName) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -4,6 +4,8 @@ query getTemplateConnections(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connections: templateConnections(projectId: $projectId) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -5,6 +5,8 @@ query getUserConnections(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connections: userConnections(projectId: $projectId, id: $connectionId) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -4,18 +4,22 @@ mutation initConnection(
|
||||
$credentials: Object
|
||||
$networkCredentials: [NetworkHandlerConfigInput!]
|
||||
$saveCredentials: Boolean
|
||||
$sharedCredentials: Boolean
|
||||
|
||||
$includeOrigin: Boolean!
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: initConnection(
|
||||
projectId: $projectId
|
||||
id: $connectionId
|
||||
credentials: $credentials
|
||||
networkCredentials: $networkCredentials
|
||||
saveCredentials: $saveCredentials
|
||||
saveCredentials: $saveCredentials,
|
||||
sharedCredentials: $sharedCredentials,
|
||||
) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ mutation setConnectionNavigatorSettings(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: setConnectionNavigatorSettings(projectId: $projectId, id: $connectionId, settings: $settings) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -6,6 +6,8 @@ mutation updateConnection(
|
||||
$customIncludeOriginDetails: Boolean!
|
||||
$includeAuthProperties: Boolean!
|
||||
$customIncludeNetworkHandlerCredentials: Boolean!
|
||||
$includeCredentialsSaved: Boolean!
|
||||
$includeAuthNeeded: Boolean!
|
||||
) {
|
||||
connection: updateConnection(projectId: $projectId, config: $config) {
|
||||
...DatabaseConnection
|
||||
|
||||
@@ -3,4 +3,5 @@ fragment AdminTeamInfo on AdminTeamInfo {
|
||||
teamName
|
||||
description
|
||||
teamPermissions
|
||||
metaParameters @include(if: $includeMetaParameters)
|
||||
}
|
||||
@@ -10,7 +10,10 @@ fragment DatabaseConnection on ConnectionInfo {
|
||||
provided
|
||||
useUrl
|
||||
readOnly
|
||||
|
||||
saveCredentials
|
||||
credentialsSaved @include(if: $includeCredentialsSaved)
|
||||
sharedCredentials
|
||||
|
||||
folder
|
||||
nodePath
|
||||
@@ -33,7 +36,7 @@ fragment DatabaseConnection on ConnectionInfo {
|
||||
...ObjectOriginInfo
|
||||
}
|
||||
|
||||
authNeeded
|
||||
authNeeded @include(if: $includeAuthNeeded)
|
||||
authModel
|
||||
|
||||
authProperties @include(if: $includeAuthProperties) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
fragment ObjectPropertyInfo on ObjectPropertyInfo {
|
||||
id
|
||||
displayName
|
||||
description
|
||||
category
|
||||
dataType
|
||||
value
|
||||
validValues
|
||||
defaultValue
|
||||
length
|
||||
features
|
||||
order
|
||||
}
|
||||
@@ -75,6 +75,7 @@ export interface AdminTeamInfo {
|
||||
description?: Maybe<Scalars['String']>;
|
||||
grantedConnections: Array<AdminConnectionGrantInfo>;
|
||||
grantedUsers: Array<Scalars['ID']>;
|
||||
metaParameters: Scalars['Object'];
|
||||
teamId: Scalars['ID'];
|
||||
teamName?: Maybe<Scalars['String']>;
|
||||
teamPermissions: Array<Scalars['ID']>;
|
||||
@@ -194,6 +195,7 @@ export interface ConnectionConfig {
|
||||
readOnly?: InputMaybe<Scalars['Boolean']>;
|
||||
saveCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
serverName?: InputMaybe<Scalars['String']>;
|
||||
sharedCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
template?: InputMaybe<Scalars['Boolean']>;
|
||||
templateId?: InputMaybe<Scalars['ID']>;
|
||||
url?: InputMaybe<Scalars['String']>;
|
||||
@@ -219,6 +221,7 @@ export interface ConnectionInfo {
|
||||
connectTime?: Maybe<Scalars['String']>;
|
||||
connected: Scalars['Boolean'];
|
||||
connectionError?: Maybe<ServerError>;
|
||||
credentialsSaved: Scalars['Boolean'];
|
||||
databaseName?: Maybe<Scalars['String']>;
|
||||
description?: Maybe<Scalars['String']>;
|
||||
driverId: Scalars['ID'];
|
||||
@@ -241,6 +244,7 @@ export interface ConnectionInfo {
|
||||
saveCredentials: Scalars['Boolean'];
|
||||
serverName?: Maybe<Scalars['String']>;
|
||||
serverVersion?: Maybe<Scalars['String']>;
|
||||
sharedCredentials: Scalars['Boolean'];
|
||||
supportedDataFormats: Array<ResultDataFormat>;
|
||||
template: Scalars['Boolean'];
|
||||
url?: Maybe<Scalars['String']>;
|
||||
@@ -542,6 +546,7 @@ export interface MutationInitConnectionArgs {
|
||||
networkCredentials?: InputMaybe<Array<NetworkHandlerConfigInput>>;
|
||||
projectId?: InputMaybe<Scalars['ID']>;
|
||||
saveCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
sharedCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
}
|
||||
|
||||
|
||||
@@ -918,6 +923,7 @@ export interface Query {
|
||||
listFeatureSets: Array<WebFeatureSet>;
|
||||
listPermissions: Array<AdminPermissionInfo>;
|
||||
listProjects: Array<ProjectInfo>;
|
||||
listTeamMetaParameters: Array<ObjectPropertyInfo>;
|
||||
listTeams: Array<AdminTeamInfo>;
|
||||
listUserProfileProperties: Array<ObjectPropertyInfo>;
|
||||
listUsers: Array<AdminUserInfo>;
|
||||
@@ -949,6 +955,7 @@ export interface Query {
|
||||
setDefaultNavigatorSettings: Scalars['Boolean'];
|
||||
setSubjectConnectionAccess?: Maybe<Scalars['Boolean']>;
|
||||
setSubjectPermissions: Array<AdminPermissionInfo>;
|
||||
setTeamMetaParameterValues: Scalars['Boolean'];
|
||||
setUserAuthRole?: Maybe<Scalars['Boolean']>;
|
||||
setUserCredentials?: Maybe<Scalars['Boolean']>;
|
||||
setUserMetaParameterValues: Scalars['Boolean'];
|
||||
@@ -1246,6 +1253,12 @@ export interface QuerySetSubjectPermissionsArgs {
|
||||
}
|
||||
|
||||
|
||||
export interface QuerySetTeamMetaParameterValuesArgs {
|
||||
parameters: Scalars['Object'];
|
||||
teamId: Scalars['ID'];
|
||||
}
|
||||
|
||||
|
||||
export interface QuerySetUserAuthRoleArgs {
|
||||
authRole?: InputMaybe<Scalars['String']>;
|
||||
userId: Scalars['ID'];
|
||||
@@ -1608,6 +1621,7 @@ export interface UserAuthToken {
|
||||
}
|
||||
|
||||
export interface UserInfo {
|
||||
authRole?: Maybe<Scalars['ID']>;
|
||||
authTokens: Array<UserAuthToken>;
|
||||
configurationParameters: Scalars['Object'];
|
||||
displayName?: Maybe<Scalars['String']>;
|
||||
@@ -1757,10 +1771,11 @@ export type CreateTeamQueryVariables = Exact<{
|
||||
teamId: Scalars['ID'];
|
||||
teamName?: InputMaybe<Scalars['String']>;
|
||||
description?: InputMaybe<Scalars['String']>;
|
||||
includeMetaParameters: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateTeamQuery = { team: { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string> } };
|
||||
export type CreateTeamQuery = { team: { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string>, metaParameters?: any } };
|
||||
|
||||
export type DeleteTeamQueryVariables = Exact<{
|
||||
teamId: Scalars['ID'];
|
||||
@@ -1776,21 +1791,36 @@ export type GetTeamGrantedUsersQueryVariables = Exact<{
|
||||
|
||||
export type GetTeamGrantedUsersQuery = { team: Array<{ grantedUsers: Array<string> }> };
|
||||
|
||||
export type GetTeamMetaParametersQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type GetTeamMetaParametersQuery = { parameters: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> };
|
||||
|
||||
export type GetTeamsListQueryVariables = Exact<{
|
||||
teamId?: InputMaybe<Scalars['ID']>;
|
||||
includeMetaParameters: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetTeamsListQuery = { teams: Array<{ teamId: string, teamName?: string, description?: string, teamPermissions: Array<string> }> };
|
||||
export type GetTeamsListQuery = { teams: Array<{ teamId: string, teamName?: string, description?: string, teamPermissions: Array<string>, metaParameters?: any }> };
|
||||
|
||||
export type SaveTeamMetaParametersQueryVariables = Exact<{
|
||||
teamId: Scalars['ID'];
|
||||
parameters: Scalars['Object'];
|
||||
}>;
|
||||
|
||||
|
||||
export type SaveTeamMetaParametersQuery = { setTeamMetaParameterValues: boolean };
|
||||
|
||||
export type UpdateTeamQueryVariables = Exact<{
|
||||
teamId: Scalars['ID'];
|
||||
teamName?: InputMaybe<Scalars['String']>;
|
||||
description?: InputMaybe<Scalars['String']>;
|
||||
includeMetaParameters: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateTeamQuery = { team: { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string> } };
|
||||
export type UpdateTeamQuery = { team: { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string>, metaParameters?: any } };
|
||||
|
||||
export type CreateUserQueryVariables = Exact<{
|
||||
userId: Scalars['ID'];
|
||||
@@ -1954,10 +1984,12 @@ export type CloseConnectionMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CloseConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type CloseConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type CreateConnectionMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -1966,10 +1998,12 @@ export type CreateConnectionMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type CreateConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type CreateConnectionFolderMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -1988,10 +2022,12 @@ export type CreateConnectionFromNodeMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateConnectionFromNodeMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type CreateConnectionFromNodeMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type CreateConnectionFromTemplateMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -2001,10 +2037,12 @@ export type CreateConnectionFromTemplateMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateConnectionFromTemplateMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type CreateConnectionFromTemplateMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type DeleteConnectionMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -2090,10 +2128,12 @@ export type GetTemplateConnectionsQueryVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetTemplateConnectionsQuery = { connections: Array<{ id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } }> };
|
||||
export type GetTemplateConnectionsQuery = { connections: Array<{ id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } }> };
|
||||
|
||||
export type GetUserConnectionsQueryVariables = Exact<{
|
||||
projectId?: InputMaybe<Scalars['ID']>;
|
||||
@@ -2102,10 +2142,12 @@ export type GetUserConnectionsQueryVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetUserConnectionsQuery = { connections: Array<{ id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } }> };
|
||||
export type GetUserConnectionsQuery = { connections: Array<{ id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } }> };
|
||||
|
||||
export type InitConnectionMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -2113,14 +2155,17 @@ export type InitConnectionMutationVariables = Exact<{
|
||||
credentials?: InputMaybe<Scalars['Object']>;
|
||||
networkCredentials?: InputMaybe<Array<NetworkHandlerConfigInput> | NetworkHandlerConfigInput>;
|
||||
saveCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
sharedCredentials?: InputMaybe<Scalars['Boolean']>;
|
||||
includeOrigin: Scalars['Boolean'];
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type InitConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type InitConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type RefreshSessionConnectionsMutationVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -2135,10 +2180,12 @@ export type SetConnectionNavigatorSettingsMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type SetConnectionNavigatorSettingsMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type SetConnectionNavigatorSettingsMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type TestConnectionMutationVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -2162,10 +2209,12 @@ export type UpdateConnectionMutationVariables = Exact<{
|
||||
customIncludeOriginDetails: Scalars['Boolean'];
|
||||
includeAuthProperties: Scalars['Boolean'];
|
||||
customIncludeNetworkHandlerCredentials: Scalars['Boolean'];
|
||||
includeCredentialsSaved: Scalars['Boolean'];
|
||||
includeAuthNeeded: Scalars['Boolean'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
export type UpdateConnectionMutation = { connection: { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } } };
|
||||
|
||||
export type ExportDataFromContainerQueryVariables = Exact<{
|
||||
projectId: Scalars['ID'];
|
||||
@@ -2219,7 +2268,7 @@ export type AdminObjectGrantInfoFragment = { subjectId: string, subjectType: Adm
|
||||
|
||||
export type AdminPermissionInfoFragment = { id: string, label?: string, description?: string, category?: string };
|
||||
|
||||
export type AdminTeamInfoFragment = { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string> };
|
||||
export type AdminTeamInfoFragment = { teamId: string, teamName?: string, description?: string, teamPermissions: Array<string>, metaParameters?: any };
|
||||
|
||||
export type AdminUserInfoFragment = { userId: string, grantedTeams: Array<string>, linkedAuthProviders: Array<string>, metaParameters?: any, enabled: boolean, authRole?: string, origins: Array<{ type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }> };
|
||||
|
||||
@@ -2237,7 +2286,7 @@ export type AuthTokenFragment = { authProvider: string, authConfiguration?: stri
|
||||
|
||||
export type ConnectionFolderInfoFragment = { id: string, projectId: string, description?: string };
|
||||
|
||||
export type DatabaseConnectionFragment = { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } };
|
||||
export type DatabaseConnectionFragment = { id: string, projectId: string, name: string, description?: string, driverId: string, template: boolean, connected: boolean, provided: boolean, useUrl: boolean, readOnly: boolean, saveCredentials: boolean, credentialsSaved?: boolean, sharedCredentials: boolean, folder?: string, nodePath?: string, host?: string, port?: string, serverName?: string, databaseName?: string, url?: string, properties?: any, providerProperties: any, requiredAuth?: string, features: Array<string>, supportedDataFormats: Array<ResultDataFormat>, configurationType?: DriverConfigurationType, authNeeded?: boolean, authModel?: string, canViewSettings: boolean, canEdit: boolean, canDelete: boolean, origin?: { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> }, authProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number }>, networkHandlersConfig: Array<{ id: string, enabled: boolean, authType: NetworkHandlerAuthType, userName?: string, password?: string, key?: string, savePassword: boolean, properties?: any }>, navigatorSettings: { showSystemObjects: boolean, showUtilityObjects: boolean, showOnlyEntities: boolean, mergeEntities: boolean, hideFolders: boolean, hideSchemas: boolean, hideVirtualModel: boolean } };
|
||||
|
||||
export type DatabaseDriverFragment = { id: string, name?: string, icon?: string, description?: string, defaultPort?: string, defaultDatabase?: string, defaultServer?: string, defaultUser?: string, sampleURL?: string, embedded?: boolean, enabled: boolean, requiresServerName?: boolean, anonymousAccess?: boolean, promotedScore?: number, defaultAuthModel: string, applicableAuthModels: Array<string>, applicableNetworkHandlers: Array<string>, configurationTypes: Array<DriverConfigurationType>, driverParameters?: any, providerProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, length: ObjectPropertyLength, features: Array<string>, order: number }>, driverProperties?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any> }> };
|
||||
|
||||
@@ -2251,6 +2300,8 @@ export type NavNodePropertiesFragment = { id?: string, category?: string, dataTy
|
||||
|
||||
export type ObjectOriginInfoFragment = { type: string, subType?: string, displayName: string, icon?: string, details?: Array<{ id?: string, displayName?: string, description?: string, category?: string, dataType?: string, defaultValue?: any, validValues?: Array<any>, value?: any, length: ObjectPropertyLength, features: Array<string>, order: number }> };
|
||||
|
||||
export type ObjectPropertyInfoFragment = { id?: string, displayName?: string, description?: string, category?: string, dataType?: string, value?: any, validValues?: Array<any>, defaultValue?: any, length: ObjectPropertyLength, features: Array<string>, order: number };
|
||||
|
||||
export type SqlScriptInfoFragment = { queries: Array<{ start: number, end: number }> };
|
||||
|
||||
export type SessionStateFragment = { createTime: string, lastAccessTime: string, cacheExpired: boolean, locale: string, actionParameters?: any, valid: boolean, remainingTime: number };
|
||||
@@ -2748,6 +2799,7 @@ export const AdminTeamInfoFragmentDoc = `
|
||||
teamName
|
||||
description
|
||||
teamPermissions
|
||||
metaParameters @include(if: $includeMetaParameters)
|
||||
}
|
||||
`;
|
||||
export const ObjectOriginInfoFragmentDoc = `
|
||||
@@ -2912,6 +2964,8 @@ export const DatabaseConnectionFragmentDoc = `
|
||||
useUrl
|
||||
readOnly
|
||||
saveCredentials
|
||||
credentialsSaved @include(if: $includeCredentialsSaved)
|
||||
sharedCredentials
|
||||
folder
|
||||
nodePath
|
||||
host
|
||||
@@ -2928,7 +2982,7 @@ export const DatabaseConnectionFragmentDoc = `
|
||||
origin @include(if: $includeOrigin) {
|
||||
...ObjectOriginInfo
|
||||
}
|
||||
authNeeded
|
||||
authNeeded @include(if: $includeAuthNeeded)
|
||||
authModel
|
||||
authProperties @include(if: $includeAuthProperties) {
|
||||
...UserConnectionAuthProperties
|
||||
@@ -3051,6 +3105,21 @@ export const NavNodeInfoFragmentDoc = `
|
||||
}
|
||||
}
|
||||
${NavNodePropertiesFragmentDoc}`;
|
||||
export const ObjectPropertyInfoFragmentDoc = `
|
||||
fragment ObjectPropertyInfo on ObjectPropertyInfo {
|
||||
id
|
||||
displayName
|
||||
description
|
||||
category
|
||||
dataType
|
||||
value
|
||||
validValues
|
||||
defaultValue
|
||||
length
|
||||
features
|
||||
order
|
||||
}
|
||||
`;
|
||||
export const SqlScriptInfoFragmentDoc = `
|
||||
fragment SQLScriptInfo on SQLScriptInfo {
|
||||
queries {
|
||||
@@ -3249,7 +3318,7 @@ export const SaveUserMetaParametersDocument = `
|
||||
}
|
||||
`;
|
||||
export const CreateTeamDocument = `
|
||||
query createTeam($teamId: ID!, $teamName: String, $description: String) {
|
||||
query createTeam($teamId: ID!, $teamName: String, $description: String, $includeMetaParameters: Boolean!) {
|
||||
team: createTeam(
|
||||
teamId: $teamId
|
||||
teamName: $teamName
|
||||
@@ -3271,15 +3340,27 @@ export const GetTeamGrantedUsersDocument = `
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const GetTeamMetaParametersDocument = `
|
||||
query getTeamMetaParameters {
|
||||
parameters: listTeamMetaParameters {
|
||||
...ObjectPropertyInfo
|
||||
}
|
||||
}
|
||||
${ObjectPropertyInfoFragmentDoc}`;
|
||||
export const GetTeamsListDocument = `
|
||||
query getTeamsList($teamId: ID) {
|
||||
query getTeamsList($teamId: ID, $includeMetaParameters: Boolean!) {
|
||||
teams: listTeams(teamId: $teamId) {
|
||||
...AdminTeamInfo
|
||||
}
|
||||
}
|
||||
${AdminTeamInfoFragmentDoc}`;
|
||||
export const SaveTeamMetaParametersDocument = `
|
||||
query saveTeamMetaParameters($teamId: ID!, $parameters: Object!) {
|
||||
setTeamMetaParameterValues(teamId: $teamId, parameters: $parameters)
|
||||
}
|
||||
`;
|
||||
export const UpdateTeamDocument = `
|
||||
query updateTeam($teamId: ID!, $teamName: String, $description: String) {
|
||||
query updateTeam($teamId: ID!, $teamName: String, $description: String, $includeMetaParameters: Boolean!) {
|
||||
team: updateTeam(
|
||||
teamId: $teamId
|
||||
teamName: $teamName
|
||||
@@ -3431,14 +3512,14 @@ export const SetSubjectConnectionAccessDocument = `
|
||||
}
|
||||
`;
|
||||
export const CloseConnectionDocument = `
|
||||
mutation closeConnection($projectId: ID!, $connectionId: ID!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation closeConnection($projectId: ID!, $connectionId: ID!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: closeConnection(projectId: $projectId, id: $connectionId) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
}
|
||||
${DatabaseConnectionFragmentDoc}`;
|
||||
export const CreateConnectionDocument = `
|
||||
mutation createConnection($projectId: ID!, $config: ConnectionConfig!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation createConnection($projectId: ID!, $config: ConnectionConfig!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: createConnection(projectId: $projectId, config: $config) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
@@ -3456,7 +3537,7 @@ export const CreateConnectionFolderDocument = `
|
||||
}
|
||||
${ConnectionFolderInfoFragmentDoc}`;
|
||||
export const CreateConnectionFromNodeDocument = `
|
||||
mutation createConnectionFromNode($projectId: ID!, $nodePath: String!, $config: ConnectionConfig, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation createConnectionFromNode($projectId: ID!, $nodePath: String!, $config: ConnectionConfig, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: copyConnectionFromNode(
|
||||
projectId: $projectId
|
||||
nodePath: $nodePath
|
||||
@@ -3467,7 +3548,7 @@ export const CreateConnectionFromNodeDocument = `
|
||||
}
|
||||
${DatabaseConnectionFragmentDoc}`;
|
||||
export const CreateConnectionFromTemplateDocument = `
|
||||
mutation createConnectionFromTemplate($projectId: ID!, $templateId: ID!, $connectionName: String!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation createConnectionFromTemplate($projectId: ID!, $templateId: ID!, $connectionName: String!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: createConnectionFromTemplate(
|
||||
projectId: $projectId
|
||||
templateId: $templateId
|
||||
@@ -3569,27 +3650,28 @@ export const GetConnectionFoldersDocument = `
|
||||
}
|
||||
${ConnectionFolderInfoFragmentDoc}`;
|
||||
export const GetTemplateConnectionsDocument = `
|
||||
query getTemplateConnections($projectId: ID, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
query getTemplateConnections($projectId: ID, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connections: templateConnections(projectId: $projectId) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
}
|
||||
${DatabaseConnectionFragmentDoc}`;
|
||||
export const GetUserConnectionsDocument = `
|
||||
query getUserConnections($projectId: ID, $connectionId: ID, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
query getUserConnections($projectId: ID, $connectionId: ID, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connections: userConnections(projectId: $projectId, id: $connectionId) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
}
|
||||
${DatabaseConnectionFragmentDoc}`;
|
||||
export const InitConnectionDocument = `
|
||||
mutation initConnection($projectId: ID!, $connectionId: ID!, $credentials: Object, $networkCredentials: [NetworkHandlerConfigInput!], $saveCredentials: Boolean, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation initConnection($projectId: ID!, $connectionId: ID!, $credentials: Object, $networkCredentials: [NetworkHandlerConfigInput!], $saveCredentials: Boolean, $sharedCredentials: Boolean, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: initConnection(
|
||||
projectId: $projectId
|
||||
id: $connectionId
|
||||
credentials: $credentials
|
||||
networkCredentials: $networkCredentials
|
||||
saveCredentials: $saveCredentials
|
||||
sharedCredentials: $sharedCredentials
|
||||
) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
@@ -3601,7 +3683,7 @@ export const RefreshSessionConnectionsDocument = `
|
||||
}
|
||||
`;
|
||||
export const SetConnectionNavigatorSettingsDocument = `
|
||||
mutation setConnectionNavigatorSettings($projectId: ID!, $connectionId: ID!, $settings: NavigatorSettingsInput!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation setConnectionNavigatorSettings($projectId: ID!, $connectionId: ID!, $settings: NavigatorSettingsInput!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: setConnectionNavigatorSettings(
|
||||
projectId: $projectId
|
||||
id: $connectionId
|
||||
@@ -3636,7 +3718,7 @@ export const TestNetworkHandlerDocument = `
|
||||
}
|
||||
`;
|
||||
export const UpdateConnectionDocument = `
|
||||
mutation updateConnection($projectId: ID!, $config: ConnectionConfig!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!) {
|
||||
mutation updateConnection($projectId: ID!, $config: ConnectionConfig!, $includeOrigin: Boolean!, $customIncludeOriginDetails: Boolean!, $includeAuthProperties: Boolean!, $customIncludeNetworkHandlerCredentials: Boolean!, $includeCredentialsSaved: Boolean!, $includeAuthNeeded: Boolean!) {
|
||||
connection: updateConnection(projectId: $projectId, config: $config) {
|
||||
...DatabaseConnection
|
||||
}
|
||||
@@ -4441,9 +4523,15 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
|
||||
getTeamGrantedUsers(variables: GetTeamGrantedUsersQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetTeamGrantedUsersQuery> {
|
||||
return withWrapper((wrappedRequestHeaders) => client.request<GetTeamGrantedUsersQuery>(GetTeamGrantedUsersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getTeamGrantedUsers', 'query');
|
||||
},
|
||||
getTeamsList(variables?: GetTeamsListQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetTeamsListQuery> {
|
||||
getTeamMetaParameters(variables?: GetTeamMetaParametersQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetTeamMetaParametersQuery> {
|
||||
return withWrapper((wrappedRequestHeaders) => client.request<GetTeamMetaParametersQuery>(GetTeamMetaParametersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getTeamMetaParameters', 'query');
|
||||
},
|
||||
getTeamsList(variables: GetTeamsListQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetTeamsListQuery> {
|
||||
return withWrapper((wrappedRequestHeaders) => client.request<GetTeamsListQuery>(GetTeamsListDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getTeamsList', 'query');
|
||||
},
|
||||
saveTeamMetaParameters(variables: SaveTeamMetaParametersQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<SaveTeamMetaParametersQuery> {
|
||||
return withWrapper((wrappedRequestHeaders) => client.request<SaveTeamMetaParametersQuery>(SaveTeamMetaParametersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'saveTeamMetaParameters', 'query');
|
||||
},
|
||||
updateTeam(variables: UpdateTeamQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<UpdateTeamQuery> {
|
||||
return withWrapper((wrappedRequestHeaders) => client.request<UpdateTeamQuery>(UpdateTeamDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'updateTeam', 'query');
|
||||
},
|
||||
|
||||
+1
@@ -12,5 +12,6 @@ export function teamContext(): TeamInfo {
|
||||
return {
|
||||
teamId: '',
|
||||
teamPermissions: [],
|
||||
metaParameters: {},
|
||||
};
|
||||
}
|
||||
|
||||
+2
-3
@@ -6,9 +6,8 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import type { TeamInfo } from '@cloudbeaver/core-authentication';
|
||||
import type { TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication';
|
||||
import type { IExecutorHandlersCollection } from '@cloudbeaver/core-executor';
|
||||
import type { CachedMapResource } from '@cloudbeaver/core-sdk';
|
||||
import type { MetadataMap } from '@cloudbeaver/core-utils';
|
||||
|
||||
export type TeamFormMode = 'edit' | 'create';
|
||||
@@ -25,7 +24,7 @@ export interface ITeamFormState {
|
||||
readonly loading: boolean;
|
||||
|
||||
readonly submittingTask: IExecutorHandlersCollection<ITeamFormSubmitData>;
|
||||
readonly resource: CachedMapResource<string, TeamInfo>;
|
||||
readonly resource: TeamsResource;
|
||||
|
||||
readonly load: () => Promise<void>;
|
||||
readonly loadTeamInfo: () => Promise<TeamInfo | undefined>;
|
||||
|
||||
+17
-1
@@ -10,7 +10,8 @@ import { observer } from 'mobx-react-lite';
|
||||
import { useRef } from 'react';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { BASE_CONTAINERS_STYLES, ColoredContainer, Group, InputField, SubmittingForm, Textarea, useTranslate, useStyles, useDataResource } from '@cloudbeaver/core-blocks';
|
||||
import { TeamMetaParametersResource } from '@cloudbeaver/core-authentication';
|
||||
import { BASE_CONTAINERS_STYLES, ColoredContainer, Group, InputField, SubmittingForm, Textarea, useTranslate, useStyles, useDataResource, Loader, GroupTitle, ObjectPropertyInfoForm } from '@cloudbeaver/core-blocks';
|
||||
import { ServerConfigResource } from '@cloudbeaver/core-root';
|
||||
import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui';
|
||||
|
||||
@@ -31,6 +32,7 @@ export const TeamOptions: TabContainerPanelComponent<ITeamFormProps> = observer(
|
||||
|
||||
const translate = useTranslate();
|
||||
const serverConfigResource = useDataResource(TeamOptions, ServerConfigResource, undefined);
|
||||
const teamMetaParameters = useDataResource(TeamOptions, TeamMetaParametersResource, undefined);
|
||||
|
||||
const style = useStyles(BASE_CONTAINERS_STYLES, styles);
|
||||
const edit = state.mode === 'edit';
|
||||
@@ -72,6 +74,20 @@ export const TeamOptions: TabContainerPanelComponent<ITeamFormProps> = observer(
|
||||
</Textarea>
|
||||
</Group>
|
||||
{!serverConfigResource.data?.distributed && <Permissions state={state} />}
|
||||
<Loader state={teamMetaParameters} inline>
|
||||
{() => teamMetaParameters.data.length > 0 && styled(style)(
|
||||
<Group small gap vertical overflow>
|
||||
<GroupTitle keepSize>{translate('authentication_team_meta_parameters')}</GroupTitle>
|
||||
<ObjectPropertyInfoForm
|
||||
state={state.config.metaParameters}
|
||||
properties={teamMetaParameters.data}
|
||||
disabled={state.disabled}
|
||||
keepSize
|
||||
tiny
|
||||
/>
|
||||
</Group>
|
||||
)}
|
||||
</Loader>
|
||||
</ColoredContainer>
|
||||
</SubmittingForm>
|
||||
);
|
||||
|
||||
+12
@@ -73,6 +73,10 @@ export class TeamOptionsTabService extends Bootstrap {
|
||||
config.description = state.config.description;
|
||||
}
|
||||
|
||||
if (state.config.metaParameters) {
|
||||
config.metaParameters = state.config.metaParameters;
|
||||
}
|
||||
|
||||
config.teamPermissions = [...state.config.teamPermissions];
|
||||
}
|
||||
|
||||
@@ -115,6 +119,7 @@ export class TeamOptionsTabService extends Bootstrap {
|
||||
status.info(team.teamId);
|
||||
} else {
|
||||
const team = await this.teamResource.updateTeam(config);
|
||||
|
||||
status.info('administration_teams_team_info_updated');
|
||||
status.info(team.teamId);
|
||||
}
|
||||
@@ -142,12 +147,19 @@ export class TeamOptionsTabService extends Bootstrap {
|
||||
if (state.info.teamId) {
|
||||
state.config.teamId = state.info.teamId;
|
||||
}
|
||||
|
||||
if (state.info.teamName) {
|
||||
state.config.teamName = state.info.teamName;
|
||||
}
|
||||
|
||||
if (state.info.description) {
|
||||
state.config.description = state.info.description;
|
||||
}
|
||||
|
||||
if (state.info.metaParameters) {
|
||||
state.config.metaParameters = state.info.metaParameters;
|
||||
}
|
||||
|
||||
state.config.teamPermissions = [...state.info.teamPermissions];
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -8,9 +8,8 @@
|
||||
|
||||
import { computed, makeObservable, observable } from 'mobx';
|
||||
|
||||
import type { TeamInfo } from '@cloudbeaver/core-authentication';
|
||||
import type { TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication';
|
||||
import { Executor, IExecutionContextProvider, IExecutor } from '@cloudbeaver/core-executor';
|
||||
import type { CachedMapResource } from '@cloudbeaver/core-sdk';
|
||||
import { MetadataMap } from '@cloudbeaver/core-utils';
|
||||
|
||||
import { teamFormConfigureContext } from './Contexts/teamFormConfigureContext';
|
||||
@@ -44,7 +43,7 @@ export class TeamFormState implements ITeamFormState {
|
||||
return false;
|
||||
}
|
||||
|
||||
readonly resource: CachedMapResource<string, TeamInfo>;
|
||||
readonly resource: TeamsResource;
|
||||
|
||||
readonly service: TeamFormService;
|
||||
readonly submittingTask: IExecutor<ITeamFormSubmitData>;
|
||||
@@ -55,12 +54,13 @@ export class TeamFormState implements ITeamFormState {
|
||||
|
||||
constructor(
|
||||
service: TeamFormService,
|
||||
resource: CachedMapResource<string, TeamInfo>
|
||||
resource: TeamsResource
|
||||
) {
|
||||
this.resource = resource;
|
||||
this.config = {
|
||||
teamId: '',
|
||||
teamPermissions: [],
|
||||
metaParameters: {},
|
||||
};
|
||||
|
||||
this.stateInfo = null;
|
||||
@@ -156,6 +156,6 @@ export class TeamFormState implements ITeamFormState {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.resource.load(data.config.teamId);
|
||||
await this.resource.load(data.config.teamId, ['includeMetaParameters']);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ export const TeamEdit = observer<Props>(function TeamEdit({
|
||||
data.config.teamId = item;
|
||||
|
||||
return styled(useStyles(styles))(
|
||||
<box ref={boxRef} as='div'>
|
||||
<box ref={boxRef}>
|
||||
<TeamForm
|
||||
state={data}
|
||||
onCancel={collapse}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user