mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-27 23:23:07 +00:00 
			
		
		
		
	GUACAMOLE-394: Add history list at User object level (similar to Connection).
This commit is contained in:
		| @@ -20,9 +20,11 @@ | ||||
| package org.apache.guacamole.auth.jdbc.sharing.user; | ||||
|  | ||||
| import java.util.Collections; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| import org.apache.guacamole.GuacamoleException; | ||||
| import org.apache.guacamole.auth.jdbc.sharing.permission.SharedObjectPermissionSet; | ||||
| import org.apache.guacamole.net.auth.ActivityRecord; | ||||
| import org.apache.guacamole.net.auth.AuthenticatedUser; | ||||
| import org.apache.guacamole.net.auth.Connection; | ||||
| import org.apache.guacamole.net.auth.ConnectionGroup; | ||||
| @@ -88,6 +90,14 @@ public class SharedUser implements User { | ||||
|         // Do nothing - no attributes supported | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<ActivityRecord> getHistory() throws GuacamoleException { | ||||
|  | ||||
|         // History is not recorded for shared users | ||||
|         return Collections.<ActivityRecord>emptyList(); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String getPassword() { | ||||
|         return null; | ||||
|   | ||||
| @@ -29,6 +29,7 @@ import java.util.Calendar; | ||||
| import java.util.Collection; | ||||
| import java.util.Collections; | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.TimeZone; | ||||
| import org.apache.guacamole.auth.jdbc.base.ModeledDirectoryObject; | ||||
| @@ -49,6 +50,7 @@ import org.apache.guacamole.form.Form; | ||||
| import org.apache.guacamole.form.TextField; | ||||
| import org.apache.guacamole.form.TimeField; | ||||
| import org.apache.guacamole.form.TimeZoneField; | ||||
| import org.apache.guacamole.net.auth.ActivityRecord; | ||||
| import org.apache.guacamole.net.auth.User; | ||||
| import org.apache.guacamole.net.auth.permission.ObjectPermissionSet; | ||||
| import org.apache.guacamole.net.auth.permission.SystemPermission; | ||||
| @@ -792,4 +794,9 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel> implements Us | ||||
|         return getModel().isExpired(); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<ActivityRecord> getHistory() throws GuacamoleException { | ||||
|         return Collections.<ActivityRecord>emptyList(); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user