Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22360

SPI cache for roles not updated when moving user to different group in legacy

    Details

      Description

      User role/permissions are not updated in Symfony after assigning the user object to a different group, through legacy Admin UI.

      steps to reproduce:
      • optional: create a custom 'testmodule' module with a 'testfunc' function

        Module = array( 'name' => 'eZ Test' );
        $FunctionList = array(
            'testfunc'    => array()
        );
        

      • optional: create a custom controller view to verify access and configure necessary routing. sample code:

                public function testAction( )
                {
                    $grantStr = $this->getRepository()->hasAccess( 'testmodule', 'testfunc' ) ? 'granted' : 'NOT granted';
                    return new Response( 'Access to testmodule/testfunc is: ' . $grantStr );
                }
        

      1. In the backoffice, grant this policy to the 'editors' role and save.
      2. In the frontend login as editor, access the view configured above.
        1. Verify that response is: "Access to testmodule/testfunc is: granted"
      3. In the backoffice, move the editor user to the 'Anonymous group'
        1. In the frontend refresh the page: response is still granted.
      4. Clear cache in admin backoffice
        1. frontend response is now "NOT granted"

      The same problem exists when assigning back to a group with permissions.

        Issue Links

          Activity

          Hide
          Marcos Loureiro (Inactive) added a comment -

          QA Approved

          Show
          Marcos Loureiro (Inactive) added a comment - QA Approved
          Show
          Yannick Roger (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/602963276a1c7e53d2f3a65795b3659e037f6474
          Show
          Joao Inacio (Inactive) added a comment - Suggested fix: https://github.com/ezsystems/ezpublish-kernel/pull/744
          Hide
          Marcos Loureiro (Inactive) added a comment - - edited

          @[~jerome.vieilledent@ez.no]
          about EZP-22317 is working as expected, however testing what [~joao.inacio@ez.no] mentions doesn't update cache.
          Sending this to Input Q.

          edit: tested on master

          Show
          Marcos Loureiro (Inactive) added a comment - - edited @ [~jerome.vieilledent@ez.no] about EZP-22317 is working as expected, however testing what [~joao.inacio@ez.no] mentions doesn't update cache. Sending this to Input Q. edit: tested on master

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 20 minutes
                4h 20m