Check for negatives groups id (returned for a not existing group) added. Solves issue #24831
This commit is contained in:
parent
a107f6b54e
commit
aba5f0b01b
|
@ -1,6 +1,8 @@
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
# Changelog for "oidc-library-portal"
|
# Changelog for "oidc-library-portal"
|
||||||
|
## [1.3.2-SNAPSHOT]
|
||||||
|
`UserSitesToGroupsAndRolesMapper` class is now more resilient to `Groups` that are not found in Liferay and for which the `LiferayGroupManager` returns -1 as its Id instead of exception throwing (#24831)
|
||||||
|
|
||||||
## [v1.3.1]
|
## [v1.3.1]
|
||||||
The `UmaJWTProvider` has been removed from `authroization-common-client` and new provider from that library (`AccessTokenProvider`) is used to transport the `access-token` only to the client library
|
The `UmaJWTProvider` has been removed from `authroization-common-client` and new provider from that library (`AccessTokenProvider`) is used to transport the `access-token` only to the client library
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -12,14 +12,14 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>oidc-library-portal</artifactId>
|
<artifactId>oidc-library-portal</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.2-SNAPSHOT</version>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>maven-portal-bom</artifactId>
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.4</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -125,6 +125,10 @@ public class UserSitesToGroupsAndRolesMapper {
|
||||||
log.error("Cannot retrieve group for site: " + actualSite.getName(), e);
|
log.error("Cannot retrieve group for site: " + actualSite.getName(), e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (actualSiteGroupId < 0) {
|
||||||
|
log.info("Retrieved group id is not valid for the site: " + actualSite.getName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (groupManager.isVRE(actualSiteGroupId) && !actualGroupAndRoles.containsKey(actualSiteGroupId)) {
|
if (groupManager.isVRE(actualSiteGroupId) && !actualGroupAndRoles.containsKey(actualSiteGroupId)) {
|
||||||
log.debug("Assigning user to new VRE site: " + actualSite.getName());
|
log.debug("Assigning user to new VRE site: " + actualSite.getName());
|
||||||
|
|
Loading…
Reference in New Issue