Skip to content

Commit

Permalink
Clear cache after internal role update
Browse files Browse the repository at this point in the history
  • Loading branch information
PasanT9 committed Jan 8, 2025
1 parent bf7e34d commit 7cc8e85
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ public boolean doPreUpdateRoleListOfUser(String username, String[] deletedRoles,
return true;
}

@Override
public boolean doPreUpdateInternalRoleListOfUser(String userName, String[] deletedRoles,
String[] newRoles,
UserStoreManager userStoreManager) {

if (!isEnable()) {
return true;

Check warning on line 185 in components/apimgt/org.wso2.carbon.apimgt.tokenmgt/src/main/java/org/wso2/carbon/apimgt/tokenmgt/listeners/KeyManagerUserOperationListener.java

View check run for this annotation

Codecov / codecov/patch

components/apimgt/org.wso2.carbon.apimgt.tokenmgt/src/main/java/org/wso2/carbon/apimgt/tokenmgt/listeners/KeyManagerUserOperationListener.java#L185

Added line #L185 was not covered by tests
}
APIUtil.clearRoleCache(getUserName(userName, userStoreManager));
return true;
}

@Override
public boolean doPreUpdateUserListOfRole(String roleName, String[] deletedUsers, String[] newUsers,
UserStoreManager userStoreManager) {
Expand Down

0 comments on commit 7cc8e85

Please sign in to comment.