mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-1723: Enforce access time restrictions for logged in users.
This commit is contained in:
@@ -412,4 +412,13 @@ public class MySQLEnvironment extends JDBCEnvironment {
|
||||
true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enforceAccessWindowsForActiveSessions() throws GuacamoleException {
|
||||
|
||||
// Enforce access window restrictions for active sessions unless explicitly disabled
|
||||
return getProperty(
|
||||
MySQLGuacamoleProperties.MYSQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS,
|
||||
true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -278,4 +278,17 @@ public class MySQLGuacamoleProperties {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether or not user-specific access time windows should be enforced for active sessions,
|
||||
* i.e. whether users with active sessions should be logged out immediately when an access
|
||||
* window closes or the user is disabled.
|
||||
*/
|
||||
public static final BooleanGuacamoleProperty MYSQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS =
|
||||
new BooleanGuacamoleProperty() {
|
||||
|
||||
@Override
|
||||
public String getName() { return "mysql-enforce-access-windows-for-active-sessions"; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user