Done ticket GEPAFINBE-76
This commit is contained in:
@@ -195,4 +195,15 @@ public class Validator {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Boolean checkIsConfidi() {
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (authentication != null && authentication.isAuthenticated()) {
|
||||
for (GrantedAuthority authority : authentication.getAuthorities()) {
|
||||
if (RoleStatusEnum.ROLE_CONFIDI.getValue().equals(authority.getAuthority())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user