Skip to content

Commit

Permalink
Merge pull request #12740 from PasanT9/role-update-2
Browse files Browse the repository at this point in the history
Clear cache after internal role update
  • Loading branch information
PasanT9 authored Jan 20, 2025
2 parents bf7e34d + 7cc8e85 commit 9619717
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;
}
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 9619717

Please sign in to comment.