GUACAMOLE-696: In JDBC module, merge effective groups.

This commit is contained in:
Virtually Nick
2019-02-21 16:19:42 -05:00
parent 215b643600
commit e1fea889ca

View File

@@ -20,6 +20,7 @@
package org.apache.guacamole.auth.jdbc.user;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.guacamole.net.auth.AuthenticatedUser;
@@ -169,4 +170,11 @@ public class ModeledAuthenticatedUser extends RemoteAuthenticatedUser {
user.setIdentifier(identifier);
}
@Override
public Set<String> getEffectiveUserGroups() {
Set<String> allGroups = new HashSet<>(user.getEffectiveUserGroups());
allGroups.addAll(super.getEffectiveUserGroups());
return Collections.unmodifiableSet(allGroups);
}
}