Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-142336

When adding roles, previously granted roles on different pagination pages are removed

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.2.X, 7.3.X, 7.4.X, Master
    • Fix Version/s: None
    • Labels:
    • Fix Priority:
      4

      Description

      Summary
      When attempting to add roles to a user, previously selected roles are removed from the user.

      Steps to Reproduce:
      *Scenario 1:*
      1) Control Panel > Users > Roles. Create at least 20+ new site roles. I used the alphabet. (Enough to cause a pagination when selecting roles)
      2) Control Panel > Users > Users and Organizations. Create a new user 'sample'.
      3) Site > People > Memberships. Navigate to any site, add the 'sample' user to the site.
      4) Click the three dots > Assign Site Roles.
      5) Click to the next/last page for the role selection and select any one of the roles in that page. In my case, it was 'Z'.
      6) Click 'Done'.
      7) At this point, we know 'sample' now has the 'Z' site role.
      8) Click the three dots > Assign Site Roles
      9) This time, without navigating the pages, just select any role on the first page. In my case, it was 'A'
      10) Click 'Done'.

      *Scenario 2:*
      1) Control Panel > Users > Roles. Create at least 20+ new site roles. I used the alphabet. (Enough to cause a pagination when selecting roles)
      2) Control Panel > Users > Users and Organizations. Create a new user 'sample'.
      3) Site > People > Memberships. Navigate to any site, add the 'sample' user to the site.
      4) Click the three dots > Assign Site Roles.
      5) Click to the next/last page for the role selection and select any one of the roles in that page. In my case, it was 'Z'.
      6) Click 'Done'.
      7) At this point, we now know 'sample' has the 'Z' site role.
      8) Click the three dots > Assign Site Roles
      9) This time, run a search for 'A | B | C' to see multiple available roles.
      10) Select roles 'A' and 'C' leaving 'B' unchecked.
      11) DO NOT CLICK DONE. This time click 'Clear'
      12) Navigate to the show available entries dropdown and change it from '20 entries' to '75 entries'
      13) We should see that there are now '3 of X selected' at the top with 'A', 'C', and 'Z' selected.
      14) Click 'Done'.

      Expected Result:
      Selected new roles will be added without removing any of the previously selected roles.

      Actual Result:
      If I do not navigate to the pages with the previously selected roles, these roles are de-selected/removed. Even in scenario 2, despite our UI stating all roles have been selected - the 'Z' role is still removed.

      Tested:
      Branch - c560f65293defad15673527103cc98f8e0ee6935 - REPRODUCED

      Master - 6db7b906ccd060990a12e667fcd78747dc496194 - REPRODUCED

      Errors/Logs/Notes:
      This behavior does NOT occur if we visit the page that the selected role is on. As long as we visit the page where the selected role is within the default pagination (20 results) - the user is updated correctly with all selected roles.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christopher.kian Christopher Kian
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Christopher Kian
              Engineering Assignee:
              Christopher Kian
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                27 weeks, 4 days ago

                  Packages

                  Version Package