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

user/role SPI cache not updated after adding/removing policies in legacy

    Details

      Description

      After adding or removing policies to a role, through legacy admin backoffice, the Symfony SPI Cache is not updated accordingly.

      Steps to reproduce:
      • optional: create a custom 'testmodule' module with a 'testfunc' function
      • 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, remove the policy from editors.
        1. In the frontend refresh the page: response is still granted.
        2. Log out, log in again, response is still granted.
      4. Clear cache in admin backoffice
        1. frontend response is now "NOT granted"

        Issue Links

          Activity

          Hide
          Joao Inacio (Inactive) added a comment -

          Note: eZ Publish 5.2 does not seem to be affected.

          Show
          Joao Inacio (Inactive) added a comment - Note: eZ Publish 5.2 does not seem to be affected.

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 2 hours
                2h