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

RemovePolicy method does remove the passed policy regarding the role it is in

    Details

      Description

      In RoleService the method RemovePolicy has 2 parameters, a role and a policy, but if you send a policy that doesn't belong to that role it will be removed from the respective role.

      Steps to reproduce:
      [Public API]
      1 - Create new role:
              identifier: Role
      2 - add a policy to "Role":
              module: content
              function: read
      3 - create new role:
              identifier: Test
      4 - add a policy to "Test"
              module: content
              function: edit
      5 - load policy from the "Test" role
      6 - call $repository->getRoleService()->removePolicy( <Role> , <Test role policy> )
       
      [admin interface]
      7 - verify that the "Role" still have it's policy
      8 - verify that the "Test" doesn't have any policy
      

      From the inputs of method and the comments on the function the policy shouldn't be removed from any other role besides the input one.

        Activity

        Show
        Petar Spanja (Inactive) added a comment - Pull request: https://github.com/ezsystems/ezpublish-kernel/pull/615
        Show
        Petar Spanja (Inactive) added a comment - Fixed in ezpublish-kernel/master: https://github.com/ezsystems/ezpublish-kernel/commit/8f9fb8813aa1a412c663c6973de1ddc6e1f5bd3c
        Hide
        Joao Pingo (Inactive) added a comment -

        QA Approved

        Show
        Joao Pingo (Inactive) added a comment - QA Approved

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcos Loureiro (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 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 days, 1 hour, 25 minutes
              2d 1h 25m