* Introduce hasSession field in datasource That makes isLogged more consistent as it will be '1' only when the player is online. * Fixes * Fix unit testing * Update config doc * Create SessionService * Create test for SessionService, avoid DB operations if sessions are disabled * Cleanup: remove outdated warning for session timeout = 0 - Remove outdated warning - Encapsulate session enabled check in SessionService * Fix failing SessionServiceTest, add data source integration tests for session methods
This commit is contained in:
@@ -208,6 +208,21 @@ public class CacheDataSource implements DataSource {
|
||||
source.setUnlogged(user.toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSession(final String user) {
|
||||
return source.hasSession(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void grantSession(final String user) {
|
||||
source.grantSession(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void revokeSession(final String user) {
|
||||
source.revokeSession(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purgeLogged() {
|
||||
source.purgeLogged();
|
||||
|
||||
Reference in New Issue
Block a user