mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-708: Add properties for automatic account creation.
This commit is contained in:
@@ -25,6 +25,8 @@ import com.google.inject.name.Names;
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.Properties;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.auth.sqlserver.conf.SQLServerDriver;
|
||||
import org.apache.guacamole.auth.sqlserver.conf.SQLServerEnvironment;
|
||||
import org.mybatis.guice.datasource.helper.JdbcHelper;
|
||||
|
||||
/**
|
||||
@@ -45,7 +47,7 @@ public class SQLServerAuthenticationProviderModule implements Module {
|
||||
/**
|
||||
* Which SQL Server driver should be used.
|
||||
*/
|
||||
private SQLServerDriver sqlServerDriver;
|
||||
private final SQLServerDriver sqlServerDriver;
|
||||
|
||||
/**
|
||||
* Creates a new SQLServer authentication provider module that configures
|
||||
|
@@ -24,6 +24,7 @@ import com.google.inject.Injector;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.auth.jdbc.JDBCAuthenticationProviderModule;
|
||||
import org.apache.guacamole.auth.jdbc.JDBCInjectorProvider;
|
||||
import org.apache.guacamole.auth.sqlserver.conf.SQLServerEnvironment;
|
||||
|
||||
/**
|
||||
* JDBCInjectorProvider implementation which configures Guice injections for
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.guacamole.auth.sqlserver;
|
||||
package org.apache.guacamole.auth.sqlserver.conf;
|
||||
|
||||
import org.apache.guacamole.properties.EnumGuacamoleProperty.PropertyValue;
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.guacamole.auth.sqlserver;
|
||||
package org.apache.guacamole.auth.sqlserver.conf;
|
||||
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.auth.jdbc.JDBCEnvironment;
|
||||
@@ -273,5 +273,11 @@ public class SQLServerEnvironment extends JDBCEnvironment {
|
||||
public boolean isRecursiveQuerySupported(SqlSession session) {
|
||||
return true; // All versions of SQL Server support recursive queries through CTEs
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean autoCreateAbsentAccounts() throws GuacamoleException {
|
||||
return getProperty(SQLServerGuacamoleProperties.SQLSERVER_AUTO_CREATE_ACCOUNTS,
|
||||
false);
|
||||
}
|
||||
|
||||
}
|
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.guacamole.auth.sqlserver;
|
||||
package org.apache.guacamole.auth.sqlserver.conf;
|
||||
|
||||
import org.apache.guacamole.properties.BooleanGuacamoleProperty;
|
||||
import org.apache.guacamole.properties.EnumGuacamoleProperty;
|
||||
@@ -193,5 +193,13 @@ public class SQLServerGuacamoleProperties {
|
||||
public String getName() { return "sqlserver-driver"; }
|
||||
|
||||
};
|
||||
|
||||
public static final BooleanGuacamoleProperty SQLSERVER_AUTO_CREATE_ACCOUNTS =
|
||||
new BooleanGuacamoleProperty() {
|
||||
|
||||
@Override
|
||||
public String getName() { return "sqlserver-auto-create-accounts"; }
|
||||
|
||||
};
|
||||
|
||||
}
|
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.guacamole.auth.sqlserver;
|
||||
package org.apache.guacamole.auth.sqlserver.conf;
|
||||
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.auth.jdbc.JDBCEnvironment;
|
Reference in New Issue
Block a user