mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: Clean up MySQLUser, handle null username. Move mybatis XMLs to proper package within resources, fix SQL syntax (guacamole.TABLE, not guacamole..TABLE - likely need to fix generator).
This commit is contained in:
@@ -89,6 +89,11 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
|
||||
@Override
|
||||
public UserContext getUserContext(Credentials credentials) throws GuacamoleException {
|
||||
|
||||
// No null users in database
|
||||
if (credentials.getUsername() == null)
|
||||
return null;
|
||||
|
||||
MySQLUserContext context = injector.getInstance(MySQLUserContext.class);
|
||||
context.init(credentials);
|
||||
return context;
|
||||
|
@@ -86,20 +86,34 @@ public class MySQLUser implements User {
|
||||
* @param credentials
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
void init (Credentials credentials) throws GuacamoleException {
|
||||
void init(Credentials credentials) throws GuacamoleException {
|
||||
|
||||
// Query user
|
||||
UserExample userExample = new UserExample();
|
||||
userExample.createCriteria().andUsernameEqualTo(credentials.getUsername());
|
||||
List<UserWithBLOBs> users = userDAO.selectByExampleWithBLOBs(userExample);
|
||||
if(users.size() > 1) // the unique constraint on the table should prevent this
|
||||
throw new GuacamoleException("Multiple users found with the same username: " + credentials.getUsername());
|
||||
if(users.isEmpty())
|
||||
throw new GuacamoleException("No user found with the supplied credentials");
|
||||
user = users.get(0);
|
||||
// check password
|
||||
if(!passwordUtility.checkCredentials(credentials, user.getPassword_hash(), user.getUsername(), user.getPassword_salt()))
|
||||
|
||||
// The unique constraint on the table should prevent this.
|
||||
if (users.size() > 1)
|
||||
throw new GuacamoleException(
|
||||
"Multiple users found with the same username: "
|
||||
+ credentials.getUsername());
|
||||
|
||||
// Check that a user was found
|
||||
if (users.isEmpty())
|
||||
throw new GuacamoleException("No user found with the supplied credentials");
|
||||
|
||||
// Get first (and only) user
|
||||
user = users.get(0);
|
||||
|
||||
// Check password
|
||||
if (!passwordUtility.checkCredentials(credentials,
|
||||
user.getPassword_hash(), user.getUsername(), user.getPassword_salt()))
|
||||
throw new GuacamoleException("No user found with the supplied credentials");
|
||||
|
||||
// Init permissions
|
||||
this.permissions = permissionCheckUtility.getAllPermissions(user.getUser_id());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -100,7 +100,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection_history
|
||||
from guacamole.guacamole_connection_history
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -116,7 +116,7 @@
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection_history
|
||||
from guacamole.guacamole_connection_history
|
||||
where history_id = #{history_id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
@@ -125,7 +125,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_history
|
||||
delete from guacamole.guacamole_connection_history
|
||||
where history_id = #{history_id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="net.sourceforge.guacamole.net.auth.mysql.model.ConnectionHistoryExample" >
|
||||
@@ -134,7 +134,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_history
|
||||
delete from guacamole.guacamole_connection_history
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -145,7 +145,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_history (history_id, user_id, connection_id,
|
||||
insert into guacamole.guacamole_connection_history (history_id, user_id, connection_id,
|
||||
start_date, end_date)
|
||||
values (#{history_id,jdbcType=INTEGER}, #{user_id,jdbcType=INTEGER}, #{connection_id,jdbcType=INTEGER},
|
||||
#{start_date,jdbcType=TIMESTAMP}, #{end_date,jdbcType=TIMESTAMP})
|
||||
@@ -156,7 +156,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_history
|
||||
insert into guacamole.guacamole_connection_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="history_id != null" >
|
||||
history_id,
|
||||
@@ -198,7 +198,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection_history
|
||||
select count(*) from guacamole.guacamole_connection_history
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -209,7 +209,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_history
|
||||
update guacamole.guacamole_connection_history
|
||||
<set >
|
||||
<if test="record.history_id != null" >
|
||||
history_id = #{record.history_id,jdbcType=INTEGER},
|
||||
@@ -237,7 +237,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_history
|
||||
update guacamole.guacamole_connection_history
|
||||
set history_id = #{record.history_id,jdbcType=INTEGER},
|
||||
user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
@@ -253,7 +253,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_history
|
||||
update guacamole.guacamole_connection_history
|
||||
<set >
|
||||
<if test="user_id != null" >
|
||||
user_id = #{user_id,jdbcType=INTEGER},
|
||||
@@ -276,7 +276,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_history
|
||||
update guacamole.guacamole_connection_history
|
||||
set user_id = #{user_id,jdbcType=INTEGER},
|
||||
connection_id = #{connection_id,jdbcType=INTEGER},
|
||||
start_date = #{start_date,jdbcType=TIMESTAMP},
|
@@ -98,7 +98,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection
|
||||
from guacamole.guacamole_connection
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -114,7 +114,7 @@
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection
|
||||
from guacamole.guacamole_connection
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
@@ -123,7 +123,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection
|
||||
delete from guacamole.guacamole_connection
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="net.sourceforge.guacamole.net.auth.mysql.model.ConnectionExample">
|
||||
@@ -132,7 +132,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection
|
||||
delete from guacamole.guacamole_connection
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -143,7 +143,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection (connection_id, connection_name, protocol
|
||||
insert into guacamole.guacamole_connection (connection_id, connection_name, protocol
|
||||
)
|
||||
values (#{connection_id,jdbcType=INTEGER}, #{connection_name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}
|
||||
)
|
||||
@@ -154,7 +154,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection
|
||||
insert into guacamole.guacamole_connection
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="connection_id != null">
|
||||
connection_id,
|
||||
@@ -184,7 +184,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection
|
||||
select count(*) from guacamole.guacamole_connection
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -195,7 +195,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
update guacamole.guacamole_connection
|
||||
<set>
|
||||
<if test="record.connection_id != null">
|
||||
connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
@@ -217,7 +217,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
update guacamole.guacamole_connection
|
||||
set connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
connection_name = #{record.connection_name,jdbcType=VARCHAR},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR}
|
||||
@@ -231,7 +231,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
update guacamole.guacamole_connection
|
||||
<set>
|
||||
<if test="connection_name != null">
|
||||
connection_name = #{connection_name,jdbcType=VARCHAR},
|
||||
@@ -248,7 +248,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
update guacamole.guacamole_connection
|
||||
set connection_name = #{connection_name,jdbcType=VARCHAR},
|
||||
protocol = #{protocol,jdbcType=VARCHAR}
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
@@ -98,7 +98,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection_parameter
|
||||
from guacamole.guacamole_connection_parameter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -114,7 +114,7 @@
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection_parameter
|
||||
from guacamole.guacamole_connection_parameter
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
and parameter_name = #{parameter_name,jdbcType=VARCHAR}
|
||||
</select>
|
||||
@@ -124,7 +124,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_parameter
|
||||
delete from guacamole.guacamole_connection_parameter
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
and parameter_name = #{parameter_name,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
@@ -134,7 +134,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_parameter
|
||||
delete from guacamole.guacamole_connection_parameter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -145,7 +145,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_parameter (connection_id, parameter_name, parameter_value
|
||||
insert into guacamole.guacamole_connection_parameter (connection_id, parameter_name, parameter_value
|
||||
)
|
||||
values (#{connection_id,jdbcType=INTEGER}, #{parameter_name,jdbcType=VARCHAR}, #{parameter_value,jdbcType=VARCHAR}
|
||||
)
|
||||
@@ -156,7 +156,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_parameter
|
||||
insert into guacamole.guacamole_connection_parameter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="connection_id != null">
|
||||
connection_id,
|
||||
@@ -186,7 +186,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection_parameter
|
||||
select count(*) from guacamole.guacamole_connection_parameter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -197,7 +197,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
update guacamole.guacamole_connection_parameter
|
||||
<set>
|
||||
<if test="record.connection_id != null">
|
||||
connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
@@ -219,7 +219,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
update guacamole.guacamole_connection_parameter
|
||||
set connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
parameter_name = #{record.parameter_name,jdbcType=VARCHAR},
|
||||
parameter_value = #{record.parameter_value,jdbcType=VARCHAR}
|
||||
@@ -233,7 +233,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
update guacamole.guacamole_connection_parameter
|
||||
<set>
|
||||
<if test="parameter_value != null">
|
||||
parameter_value = #{parameter_value,jdbcType=VARCHAR},
|
||||
@@ -248,7 +248,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
update guacamole.guacamole_connection_parameter
|
||||
set parameter_value = #{parameter_value,jdbcType=VARCHAR}
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
and parameter_name = #{parameter_name,jdbcType=VARCHAR}
|
@@ -98,7 +98,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_connection_permission
|
||||
from guacamole.guacamole_connection_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -112,7 +112,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_permission
|
||||
delete from guacamole.guacamole_connection_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
and connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
and permission = #{permission,jdbcType=CHAR}
|
||||
@@ -123,7 +123,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_permission
|
||||
delete from guacamole.guacamole_connection_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -134,7 +134,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_permission (user_id, connection_id, permission
|
||||
insert into guacamole.guacamole_connection_permission (user_id, connection_id, permission
|
||||
)
|
||||
values (#{user_id,jdbcType=INTEGER}, #{connection_id,jdbcType=INTEGER}, #{permission,jdbcType=CHAR}
|
||||
)
|
||||
@@ -145,7 +145,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_permission
|
||||
insert into guacamole.guacamole_connection_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="user_id != null">
|
||||
user_id,
|
||||
@@ -175,7 +175,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection_permission
|
||||
select count(*) from guacamole.guacamole_connection_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -186,7 +186,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_permission
|
||||
update guacamole.guacamole_connection_permission
|
||||
<set>
|
||||
<if test="record.user_id != null">
|
||||
user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -208,7 +208,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_permission
|
||||
update guacamole.guacamole_connection_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
permission = #{record.permission,jdbcType=CHAR}
|
@@ -97,7 +97,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_system_permission
|
||||
from guacamole.guacamole_system_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -111,7 +111,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_system_permission
|
||||
delete from guacamole.guacamole_system_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
and permission = #{permission,jdbcType=CHAR}
|
||||
</delete>
|
||||
@@ -121,7 +121,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_system_permission
|
||||
delete from guacamole.guacamole_system_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -132,7 +132,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_system_permission (user_id, permission)
|
||||
insert into guacamole.guacamole_system_permission (user_id, permission)
|
||||
values (#{user_id,jdbcType=INTEGER}, #{permission,jdbcType=CHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="net.sourceforge.guacamole.net.auth.mysql.model.SystemPermissionKey">
|
||||
@@ -141,7 +141,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_system_permission
|
||||
insert into guacamole.guacamole_system_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="user_id != null">
|
||||
user_id,
|
||||
@@ -165,7 +165,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_system_permission
|
||||
select count(*) from guacamole.guacamole_system_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -176,7 +176,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_system_permission
|
||||
update guacamole.guacamole_system_permission
|
||||
<set>
|
||||
<if test="record.user_id != null">
|
||||
user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -195,7 +195,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_system_permission
|
||||
update guacamole.guacamole_system_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
permission = #{record.permission,jdbcType=CHAR}
|
||||
<if test="_parameter != null">
|
@@ -116,7 +116,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from guacamole..guacamole_user
|
||||
from guacamole.guacamole_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -135,7 +135,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_user
|
||||
from guacamole.guacamole_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -153,7 +153,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from guacamole..guacamole_user
|
||||
from guacamole.guacamole_user
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
@@ -162,7 +162,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user
|
||||
delete from guacamole.guacamole_user
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="net.sourceforge.guacamole.net.auth.mysql.model.UserExample">
|
||||
@@ -171,7 +171,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user
|
||||
delete from guacamole.guacamole_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -182,7 +182,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user (user_id, username, password_hash,
|
||||
insert into guacamole.guacamole_user (user_id, username, password_hash,
|
||||
password_salt)
|
||||
values (#{user_id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password_hash,jdbcType=BINARY},
|
||||
#{password_salt,jdbcType=BINARY})
|
||||
@@ -193,7 +193,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user
|
||||
insert into guacamole.guacamole_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="user_id != null">
|
||||
user_id,
|
||||
@@ -229,7 +229,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_user
|
||||
select count(*) from guacamole.guacamole_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -240,7 +240,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
<set>
|
||||
<if test="record.user_id != null">
|
||||
user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -265,7 +265,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
username = #{record.username,jdbcType=VARCHAR},
|
||||
password_hash = #{record.password_hash,jdbcType=BINARY},
|
||||
@@ -280,7 +280,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
username = #{record.username,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@@ -293,7 +293,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
<set>
|
||||
<if test="username != null">
|
||||
username = #{username,jdbcType=VARCHAR},
|
||||
@@ -313,7 +313,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
set username = #{username,jdbcType=VARCHAR},
|
||||
password_hash = #{password_hash,jdbcType=BINARY},
|
||||
password_salt = #{password_salt,jdbcType=BINARY}
|
||||
@@ -325,7 +325,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
update guacamole.guacamole_user
|
||||
set username = #{username,jdbcType=VARCHAR}
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
</update>
|
@@ -98,7 +98,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from guacamole..guacamole_user_permission
|
||||
from guacamole.guacamole_user_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -112,7 +112,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user_permission
|
||||
delete from guacamole.guacamole_user_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
and affected_user_id = #{affected_user_id,jdbcType=INTEGER}
|
||||
and permission = #{permission,jdbcType=CHAR}
|
||||
@@ -123,7 +123,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user_permission
|
||||
delete from guacamole.guacamole_user_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -134,7 +134,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user_permission (user_id, affected_user_id, permission
|
||||
insert into guacamole.guacamole_user_permission (user_id, affected_user_id, permission
|
||||
)
|
||||
values (#{user_id,jdbcType=INTEGER}, #{affected_user_id,jdbcType=INTEGER}, #{permission,jdbcType=CHAR}
|
||||
)
|
||||
@@ -145,7 +145,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user_permission
|
||||
insert into guacamole.guacamole_user_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="user_id != null">
|
||||
user_id,
|
||||
@@ -175,7 +175,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_user_permission
|
||||
select count(*) from guacamole.guacamole_user_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -186,7 +186,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user_permission
|
||||
update guacamole.guacamole_user_permission
|
||||
<set>
|
||||
<if test="record.user_id != null">
|
||||
user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -208,7 +208,7 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 19 23:09:22 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user_permission
|
||||
update guacamole.guacamole_user_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
affected_user_id = #{record.affected_user_id,jdbcType=INTEGER},
|
||||
permission = #{record.permission,jdbcType=CHAR}
|
Reference in New Issue
Block a user