mike-jumper commented on code in PR #673:
URL: https://github.com/apache/guacamole-client/pull/673#discussion_r1413013511


##########
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java:
##########
@@ -28,6 +28,25 @@
  */
 public interface UserGroup extends Identifiable, Attributes, Permissions {
 
+    /**
+     * Returns true if the user group is disabled, making membership in the 
group
+     * ineffective, meaning that any permissions or other group membership
+     * assigned to this group will not apply to member groups and users.
+     * 
+     * @return 
+     *     True if the group is disabled, otherwise false.
+     */
+    public boolean isDisabled();
+    
+    /**
+     * Set the disabled status of the user group, passing a boolean true value
+     * if the user group should be disabled, otherwise false.
+     * 
+     * @param disabled 
+     *     True if the user group should be disabled, otherwise false.
+     */
+    public void setDisabled(boolean disabled);

Review Comment:
   Same here - needs a `default` implementation.



##########
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java:
##########
@@ -79,6 +79,23 @@ public static class Attribute {
      * @param password The password to set.
      */
     public void setPassword(String password);
+    
+    /**
+     * Returns true if this user account is disabled, otherwise false.
+     * 
+     * @return 
+     *     True if this user account is disabled, otherwise false.
+     */
+    public boolean isDisabled();
+    
+    /**
+     * Set the disabled status of this account to the boolean parameter as
+     * provided, true if the account should be disabled, otherwise false.
+     * 
+     * @param disabled 
+     *     True if the account should be disabled, otherwise false.
+     */
+    public void setDisabled(boolean disabled);

Review Comment:
   Thoughts on whether these should be defined via an interface that both 
`User` and `UserGroup` inherit?



##########
guacamole/src/main/frontend/src/app/rest/types/UserGroup.js:
##########
@@ -42,6 +42,11 @@ angular.module('rest').factory('UserGroup', [function 
defineUserGroup() {
          * @type String
          */
         this.identifier = template.identifier;
+        
+        /**
+         * True if this user group is disabled, otherwise false.
+         */

Review Comment:
   Please add `@type` annotation.



##########
guacamole/src/main/frontend/src/app/rest/types/User.js:
##########
@@ -61,6 +61,11 @@ angular.module('rest').factory('User', [function 
defineUser() {
          * @type Number
          */
         this.lastActive = template.lastActive;
+        
+        /**
+         * True if this user account is disabled, otherwise false.
+         */

Review Comment:
   Same here - `@type` annotation needed.



##########
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java:
##########
@@ -79,6 +79,23 @@ public static class Attribute {
      * @param password The password to set.
      */
     public void setPassword(String password);
+    
+    /**
+     * Returns true if this user account is disabled, otherwise false.
+     * 
+     * @return 
+     *     True if this user account is disabled, otherwise false.
+     */
+    public boolean isDisabled();
+    
+    /**
+     * Set the disabled status of this account to the boolean parameter as
+     * provided, true if the account should be disabled, otherwise false.
+     * 
+     * @param disabled 
+     *     True if the account should be disabled, otherwise false.
+     */
+    public void setDisabled(boolean disabled);

Review Comment:
   For compatibility, this should have a `default` implementation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to