Skip to content

Commit

Permalink
Update IdentityOauthEventHandler to support Role V2 (#2198)
Browse files Browse the repository at this point in the history
handle role v2 events
  • Loading branch information
shashimalcse authored Oct 25, 2023
1 parent 62252b5 commit 1532d38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public void handleEvent(Event event) throws IdentityEventException {
throw new IdentityEventException(errorMsg);
}

} else if (IdentityEventConstants.Event.POST_UPDATE_USER_LIST_OF_ROLE_EVENT.equals(event.getEventName())) {
} else if (IdentityEventConstants.Event.POST_UPDATE_USER_LIST_OF_ROLE_EVENT.equals(event.getEventName()) ||
IdentityEventConstants.Event.POST_UPDATE_USER_LIST_OF_ROLE_V2_EVENT.equals(event.getEventName())) {

Object userIdList = event.getEventProperties()
.get(IdentityEventConstants.EventProperty.DELETE_USER_ID_LIST);
Expand All @@ -119,7 +120,9 @@ public void handleEvent(Event event) throws IdentityEventException {
}

} else if (IdentityEventConstants.Event.PRE_DELETE_ROLE_EVENT.equals(event.getEventName()) ||
IdentityEventConstants.Event.POST_SET_PERMISSIONS_FOR_ROLE_EVENT.equals(event.getEventName())) {
IdentityEventConstants.Event.PRE_DELETE_ROLE_V2_EVENT.equals(event.getEventName()) ||
IdentityEventConstants.Event.POST_SET_PERMISSIONS_FOR_ROLE_EVENT.equals(event.getEventName()) ||
IdentityEventConstants.Event.POST_UPDATE_PERMISSIONS_FOR_ROLE_V2_EVENT.equals(event.getEventName())) {

String roleId = (String) event.getEventProperties()
.get(IdentityEventConstants.EventProperty.ROLE_ID);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@
<carbon.kernel.registry.imp.pkg.version.range>[1.0.1, 2.0.0)</carbon.kernel.registry.imp.pkg.version.range>

<!-- Carbon Identity Framework version -->
<carbon.identity.framework.version>5.25.427</carbon.identity.framework.version>
<carbon.identity.framework.version>5.25.436</carbon.identity.framework.version>
<carbon.identity.framework.imp.pkg.version.range>[5.25.234, 7.0.0)
</carbon.identity.framework.imp.pkg.version.range>

Expand Down

0 comments on commit 1532d38

Please sign in to comment.