fix: 🐛 Added missing return values when RPC disabled
parent
e1f5cd2ea8
commit
733597a473
|
@ -851,7 +851,11 @@ public class PerunAdapterRpc extends PerunAdapterWithMappingServices implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidMemberInGroupsAndVos(Long userId, Set<Long> mandatoryVos, Set<Long> mandatoryGroups,
|
public boolean isValidMemberInGroupsAndVos(Long userId, Set<Long> mandatoryVos, Set<Long> mandatoryGroups,
|
||||||
Set<Long> envVos, Set<Long> envGroups) {
|
Set<Long> envVos, Set<Long> envGroups)
|
||||||
|
{
|
||||||
|
if (!this.connectorRpc.isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
List<Member> members = getMembersByUser(userId);
|
List<Member> members = getMembersByUser(userId);
|
||||||
Set<Long> foundVoIds = new HashSet<>();
|
Set<Long> foundVoIds = new HashSet<>();
|
||||||
Set<Long> foundGroupIds = new HashSet<>();
|
Set<Long> foundGroupIds = new HashSet<>();
|
||||||
|
@ -869,7 +873,11 @@ public class PerunAdapterRpc extends PerunAdapterWithMappingServices implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidMemberInGroupsAndVos(Long userId, Set<Long> vos, Set<Long> groups) {
|
public boolean isValidMemberInGroupsAndVos(Long userId, Set<Long> vos, Set<Long> groups)
|
||||||
|
{
|
||||||
|
if (!this.connectorRpc.isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
List<Member> members = getMembersByUser(userId);
|
List<Member> members = getMembersByUser(userId);
|
||||||
Set<Long> foundVoIds = new HashSet<>();
|
Set<Long> foundVoIds = new HashSet<>();
|
||||||
Set<Long> foundGroupIds = new HashSet<>();
|
Set<Long> foundGroupIds = new HashSet<>();
|
||||||
|
@ -889,6 +897,9 @@ public class PerunAdapterRpc extends PerunAdapterWithMappingServices implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUserInVo(Long userId, String voShortName) {
|
public boolean isUserInVo(Long userId, String voShortName) {
|
||||||
|
if (!this.connectorRpc.isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (userId == null) {
|
if (userId == null) {
|
||||||
throw new IllegalArgumentException("No userId");
|
throw new IllegalArgumentException("No userId");
|
||||||
} else if (!StringUtils.hasText(voShortName)) {
|
} else if (!StringUtils.hasText(voShortName)) {
|
||||||
|
|
Loading…
Reference in New Issue