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

    XMLWordPrintable

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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no 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