mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUAC-1100: Fix comments in User. ObjectPermissionSet does not need ObjectType parameter.
This commit is contained in:
		| @@ -69,47 +69,56 @@ public interface User { | ||||
|     public void setPassword(String password); | ||||
|  | ||||
|     /** | ||||
|      * Lists all permissions given to this user. | ||||
|      * Returns all system-level permissions given to this user. | ||||
|      * | ||||
|      * @return A Set of all permissions granted to this user. | ||||
|      * @return | ||||
|      *     A SystemPermissionSet of all system-level permissions granted to | ||||
|      *     this user. | ||||
|      * | ||||
|      * @throws GuacamoleException  If an error occurs while retrieving | ||||
|      *                             permissions, or if reading all permissions | ||||
|      *                             is not allowed. | ||||
|      * @throws GuacamoleException  | ||||
|      *     If an error occurs while retrieving permissions, or if reading all | ||||
|      *     permissions is not allowed. | ||||
|      */ | ||||
|     SystemPermissionSet getSystemPermissions() throws GuacamoleException; | ||||
|  | ||||
|     /** | ||||
|      * Lists all permissions given to this user. | ||||
|      * Returns all connection permissions given to this user. | ||||
|      * | ||||
|      * @return A Set of all permissions granted to this user. | ||||
|      * @return | ||||
|      *     An ObjectPermissionSet of all connection permissions granted to this | ||||
|      *     user. | ||||
|      * | ||||
|      * @throws GuacamoleException  If an error occurs while retrieving | ||||
|      *                             permissions, or if reading all permissions | ||||
|      *                             is not allowed. | ||||
|      * @throws GuacamoleException  | ||||
|      *     If an error occurs while retrieving permissions, or if reading all | ||||
|      *     permissions is not allowed. | ||||
|      */ | ||||
|     ObjectPermissionSet<String, Connection> getConnectionPermissions() throws GuacamoleException; | ||||
|     ObjectPermissionSet<String> getConnectionPermissions() | ||||
|             throws GuacamoleException; | ||||
|  | ||||
|     /** | ||||
|      * Lists all permissions given to this user. | ||||
|      * Returns all connection group permissions given to this user. | ||||
|      * | ||||
|      * @return A Set of all permissions granted to this user. | ||||
|      * @return | ||||
|      *     An ObjectPermissionSet of all connection group permissions granted | ||||
|      *     to this user. | ||||
|      * | ||||
|      * @throws GuacamoleException  If an error occurs while retrieving | ||||
|      *                             permissions, or if reading all permissions | ||||
|      *                             is not allowed. | ||||
|      * @throws GuacamoleException | ||||
|      *     If an error occurs while retrieving permissions, or if reading all | ||||
|      *     permissions is not allowed. | ||||
|      */ | ||||
|     ObjectPermissionSet<String, ConnectionGroup> getConnectionGroupPermissions() throws GuacamoleException; | ||||
|     ObjectPermissionSet<String> getConnectionGroupPermissions() | ||||
|             throws GuacamoleException; | ||||
|  | ||||
|     /** | ||||
|      * Lists all permissions given to this user. | ||||
|      * Returns all user permissions given to this user. | ||||
|      * | ||||
|      * @return A Set of all permissions granted to this user. | ||||
|      * @return | ||||
|      *     An ObjectPermissionSet of all user permissions granted to this user. | ||||
|      * | ||||
|      * @throws GuacamoleException  If an error occurs while retrieving | ||||
|      *                             permissions, or if reading all permissions | ||||
|      *                             is not allowed. | ||||
|      * @throws GuacamoleException | ||||
|      *     If an error occurs while retrieving permissions, or if reading all | ||||
|      *     permissions is not allowed. | ||||
|      */ | ||||
|     ObjectPermissionSet<String, User> getUserPermissions() throws GuacamoleException; | ||||
|     ObjectPermissionSet<String> getUserPermissions() throws GuacamoleException; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -34,12 +34,8 @@ import org.glyptodon.guacamole.GuacamoleException; | ||||
|  * @param <IdentifierType> | ||||
|  *     The type of identifier used to identify objects affected by permissions | ||||
|  *     stored in this ObjectPermissionSet. | ||||
|  * | ||||
|  * @param <ObjectType> | ||||
|  *     The type of objects affected by permissions stored in this | ||||
|  *     ObjectPermissionSet. | ||||
|  */ | ||||
| public interface ObjectPermissionSet<IdentifierType, ObjectType> { | ||||
| public interface ObjectPermissionSet<IdentifierType> { | ||||
|  | ||||
|     /** | ||||
|      * Tests whether the permission of the given type is granted for the | ||||
|   | ||||
| @@ -39,13 +39,9 @@ import org.glyptodon.guacamole.net.auth.permission.ObjectPermissionSet; | ||||
|  * @param <IdentifierType> | ||||
|  *     The type of identifier used to identify objects affected by permissions | ||||
|  *     stored in this SimpleObjectPermissionSet. | ||||
|  * | ||||
|  * @param <ObjectType> | ||||
|  *     The type of objects affected by permissions stored in this | ||||
|  *     SimpleObjectPermissionSet. | ||||
|  */ | ||||
| public class SimpleObjectPermissionSet<IdentifierType, ObjectType> | ||||
|     implements ObjectPermissionSet<IdentifierType, ObjectType> { | ||||
| public class SimpleObjectPermissionSet<IdentifierType> | ||||
|     implements ObjectPermissionSet<IdentifierType> { | ||||
|  | ||||
|     /** | ||||
|      * The set of all permissions currently granted. | ||||
|   | ||||
| @@ -112,21 +112,21 @@ public class SimpleUser extends AbstractUser { | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public ObjectPermissionSet<String, Connection> getConnectionPermissions() | ||||
|     public ObjectPermissionSet<String> getConnectionPermissions() | ||||
|             throws GuacamoleException { | ||||
|         return new SimpleObjectPermissionSet<String, Connection>(connectionPermissions); | ||||
|         return new SimpleObjectPermissionSet<String>(connectionPermissions); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public ObjectPermissionSet<String, ConnectionGroup> getConnectionGroupPermissions() | ||||
|     public ObjectPermissionSet<String> getConnectionGroupPermissions() | ||||
|             throws GuacamoleException { | ||||
|         return new SimpleObjectPermissionSet<String, ConnectionGroup>(connectionGroupPermissions); | ||||
|         return new SimpleObjectPermissionSet<String>(connectionGroupPermissions); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public ObjectPermissionSet<String, User> getUserPermissions() | ||||
|     public ObjectPermissionSet<String> getUserPermissions() | ||||
|             throws GuacamoleException { | ||||
|         return new SimpleObjectPermissionSet<String, User>(); | ||||
|         return new SimpleObjectPermissionSet<String>(); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user