mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-394: Add getLastActive() function, returning the time that a user/connection was last logged-in / used.
This commit is contained in:
@@ -24,6 +24,7 @@ import com.google.inject.Provider;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -232,6 +233,11 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
|
||||
return getModel().getSharingProfileIdentifiers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastActive() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
|
||||
return connectionService.retrieveHistory(getCurrentUser(), this);
|
||||
|
@@ -21,6 +21,7 @@ package org.apache.guacamole.auth.jdbc.sharing.connection;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -146,6 +147,11 @@ public class SharedConnection implements Connection {
|
||||
// Do nothing - changing attributes not supported
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastActive() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ConnectionRecord> getHistory()
|
||||
throws GuacamoleException {
|
||||
|
@@ -20,6 +20,7 @@
|
||||
package org.apache.guacamole.auth.jdbc.sharing.user;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
@@ -90,6 +91,14 @@ public class SharedUser implements User {
|
||||
// Do nothing - no attributes supported
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastActive() {
|
||||
|
||||
// History is not recorded for shared users
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityRecord> getHistory() throws GuacamoleException {
|
||||
|
||||
|
@@ -794,6 +794,11 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel> implements Us
|
||||
return getModel().isExpired();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastActive() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityRecord> getHistory() throws GuacamoleException {
|
||||
return Collections.<ActivityRecord>emptyList();
|
||||
|
Reference in New Issue
Block a user