Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-12485

Adding/Removing a role doesn't take effect even if you clear the kim cache

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.5
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-5097KIM Caches are not being flushed as required.
      KULRICE-3726Add caching of role members loaded from the database
      KULRICE-6547Create New Role seems to be setting KimType to default value, even if other kim type selected
      KULRICE-8373Delegation/Role caches not being updated after role document delegation change
      KULRICE-5672KIM Person record doesn't allow international phone# format
      KULRICE-7185Optimization of KIM Permission Checks
      KULRICE-9182Kim Effective Dating
      KULRICE-7127Authorization checks in KIM are no longer being cached along with role membership
      KULRICE-764When updating color preferences for Action List, changes don't take effect immediately.
      KULRICE-8415Large roles cannot be opened or edited in KIM
    • Rice Module:
      KIM
    • Application Requirement:
      KC
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Per reporter:
      ----------------------------------------------
      When you modify roles in KC using the Person Document they will not work unless you manually clear the kim Cache.

      If you add a person to a role using role maintenance there is no need to clear the cache. Which indicates that this maintenance document correctly updates the cache when modifications are made that affect it.

      To recreate this issue.
      1) login as jtester
      2) confirm that jtester can not create an award by clicking on the + in central admin tab to add an award.
      3) login as quickstart
      4) edit jtester person maintenance document
      5) add "Award Modifier" role to jtester for unit 000001 descending
      6) submit person document
      7) reload document after a few seconds to confirm the document went final
      8) login as jtester
      9) attempt to add an award again.
      NOTE that you can not add awards even though jtester now has the role
      10) login as quickstart (so you can clear the cache)
      11) clear the kim cache (System admin tab->Cache Admin...select kimDistributedCacheManger...click flush
      (Ignore error produced "intended message with key:flush.all.cachemanger not found...I am told my Gayathri that the flush still happens it's just the post message to display that is missing....this should probably also be fixed see attached screen shot)
      12) login as jtester
      13) attempt to add an award
      Note that you now can add award. Indicating that the person document added the role correctly but the cache was not correctly updated.

      This bug is especially risky when you are removing a role since if you forget to clear the cache the user keeps the role.

      Also, it appears since the RICE upgrade, clearing the cache is not doing the trick either.
      ----------------------------------------------------------------------
      the following fix makes it so you do not need to explicitly clear cache after making the person doc changes but I am not sure why clearing the cache explicitly does not do the trick. I see that one of the targets is the Role cache, so that should have worked.
      Fix:

      UiDocumentService
       @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME, Principal.Cache.NAME, Role.Cache.NAME, GroupMember.Cache.NAME, RoleMember.Cache.NAME}, allEntries = true)
          void saveEntityPerson(IdentityManagementPersonDocument identityManagementPersonDocument);
      

        Issue Links

          Activity

          Hide
          Kristina Taylor (Inactive) added a comment -

          Confirmed that the Cache Admin screen works in 2.3.5 for both individual and group caches. The only fix for this issue should be that annotation change. However, the cache admin screen is broken for 2.4, so I will be filing a Jira for that.

          Show
          Kristina Taylor (Inactive) added a comment - Confirmed that the Cache Admin screen works in 2.3.5 for both individual and group caches. The only fix for this issue should be that annotation change. However, the cache admin screen is broken for 2.4, so I will be filing a Jira for that.
          Hide
          Gayathri Athreya added a comment -

          Works in KC now.

          Show
          Gayathri Athreya added a comment - Works in KC now.

            People

            • Assignee:
              Gayathri Athreya
              Reporter:
              Gayathri Athreya
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel