|
@@ -50,7 +50,13 @@ public class SimpleGroupsMapping implements GroupMappingServiceProvider {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Set<String> getGroupsSet(String user) throws IOException {
|
|
public Set<String> getGroupsSet(String user) throws IOException {
|
|
- return ImmutableSet.of(user + "group", user + "subgroup1",
|
|
|
|
- user + "subgroup2");
|
|
|
|
|
|
+ if ("admins".equals(user)) {
|
|
|
|
+ return ImmutableSet.of("root");
|
|
|
|
+ } else if ("nosecondarygroupuser".equals(user)) {
|
|
|
|
+ return ImmutableSet.of("primarygrouponly");
|
|
|
|
+ } else {
|
|
|
|
+ return ImmutableSet.of(user + "group", user + "subgroup1",
|
|
|
|
+ user + "subgroup2");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|