[DURACOM-192] Authentication Method related special groups are put in claim set even if a different authentication method is used

This commit is contained in:
Luca Giamminonni
2023-10-17 16:28:37 +02:00
parent 92844f0b05
commit 6504d749b9
3 changed files with 30 additions and 4 deletions

View File

@@ -179,10 +179,15 @@ public class AuthenticationServiceImpl implements AuthenticationService {
int totalLen = 0;
for (AuthenticationMethod method : getAuthenticationMethodStack()) {
List<Group> gl = method.getSpecialGroups(context, request);
if (gl.size() > 0) {
result.addAll(gl);
totalLen += gl.size();
if (method.areSpecialGroupsApplicable(context, request)) {
List<Group> gl = method.getSpecialGroups(context, request);
if (gl.size() > 0) {
result.addAll(gl);
totalLen += gl.size();
}
}
}