GUACAMOLE-696: Use Guava Sets to combine the user groups.
This commit is contained in:
1 parent
e1fea889ca
commit
9158ca68e3
1 file changed
+3
-4
+3
-4
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
package org.apache.guacamole.auth.jdbc.user;
|
package org.apache.guacamole.auth.jdbc.user;
|
||||||
|
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import org.apache.guacamole.net.auth.AuthenticatedUser;
|
import org.apache.guacamole.net.auth.AuthenticatedUser;
|
||||||
@@ -172,9 +172,8 @@ public class ModeledAuthenticatedUser extends RemoteAuthenticatedUser {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<String> getEffectiveUserGroups() {
|
public Set<String> getEffectiveUserGroups() {
|
||||||
Set<String> allGroups = new HashSet<>(user.getEffectiveUserGroups());
|
return Sets.union(user.getEffectiveUserGroups(),
|
||||||
allGroups.addAll(super.getEffectiveUserGroups());
|
super.getEffectiveUserGroups());
|
||||||
return Collections.unmodifiableSet(allGroups);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user