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

5.2 Role Service API allows duplicate assignments with subtree limitations to user group

    Details

    • Sprint:
      Castor Core S2, Castor Core S3, Castor Core S4

      Description

      Using the 5.2 API, it is possible to assign the same role with the same subtree limitations repeatedly.

      Setup:
      1. Create a user group
      2. Via the API, call the following:

      $group = $userService->loadUserGroup( <group ID> );
      $profileRole = $roleService->loadRoleByIdentifier( 'some_role' );
      $limitation = new SubtreeLimitation( array( 'limitationValues' => array( '/1/2/214/' ) ) );
      $roleService->assignRoleToUserGroup( $profileRole, $group, $limitation );
      // Second call
      $roleService->assignRoleToUserGroup( $profileRole, $group, $limitation );
      

      Expected:
      Looking at the user group in the admin interface, you should only see the single role

      Actual:
      You will see the role and limitation applied twice. Note: this does not occur when applying roles via the admin interface.

        Activity

        Ricardo Correia (Inactive) created issue -
        Ricardo Correia (Inactive) made changes -
        Field Original Value New Value
        Status Open [ 1 ] Confirmed [ 10037 ]
        Paulo Lopes (Inactive) made changes -
        Status Confirmed [ 10037 ] InputQ [ 10001 ]
        André Rømcke made changes -
        Assignee André Rømcke [ andre.romcke@ez.no ]
        André Rømcke made changes -
        Sprint Castor Core S2 [ 32 ]
        André Rømcke made changes -
        Rank Ranked higher
        Hide
        Joao Inacio (Inactive) added a comment -
        Show
        Joao Inacio (Inactive) added a comment - PR for possible fix: https://github.com/ezsystems/ezpublish-kernel/pull/926
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Remaining Estimate 1 day [ 28800 ]
        André Rømcke made changes -
        Original Estimate 1 day [ 28800 ]
        André Rømcke made changes -
        Sprint Castor Core S2 [ 32 ] Castor Core S2, Castor Core S3 [ 32, 33 ]
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Sprint Castor Core S2, Castor Core S3 [ 32, 33 ] Castor Core S2, Castor Core S3, Castor Core S4 [ 32, 33, 36 ]
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Assignee André Rømcke [ andre.romcke@ez.no ]
        Petar Spanja (Inactive) logged work - 05/Aug/14 2:02 AM
        • Time Spent:
          45 minutes
           

          review

        André Rømcke made changes -
        Assignee Petar Spanja [ petar.spanja@ez.no ]
        Petar Spanja (Inactive) made changes -
        Remaining Estimate 1 day [ 28800 ] 7 hours, 15 minutes [ 26100 ]
        Time Spent 45 minutes [ 2700 ]
        Worklog Id 50052 [ 50052 ]
        Hide
        André Rømcke added a comment -

        Status update: Pull Request (PR) was closed as an agreement was made there on solving this using a different approach, awaiting new PR. For PR status always check the PR itself.

        Show
        André Rømcke added a comment - Status update: Pull Request (PR) was closed as an agreement was made there on solving this using a different approach, awaiting new PR. For PR status always check the PR itself.
        André Rømcke made changes -
        Assignee Petar Spanja [ petar.spanja@ez.no ]
        André Rømcke made changes -
        Rank Ranked higher
        Jérôme Vieilledent (Inactive) made changes -
        Assignee André Rømcke [ andre.romcke@ez.no ]
        André Rømcke made changes -
        Status InputQ [ 10001 ] Development [ 3 ]
        Show
        André Rømcke added a comment - New PR: https://github.com/ezsystems/ezpublish-kernel/pull/994
        André Rømcke made changes -
        Status Development [ 3 ] Development review [ 10006 ]
        Affects Version/s 5.4-dev [ 13485 ]
        Affects Version/s 5.3.1 [ 13482 ]
        Fix Version/s 5.2 Maintenance [ 12782 ]
        Fix Version/s 5.4 [ 13180 ]
        Fix Version/s 5.3.3 [ 13484 ]
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/ezpublish-kernel/commit/11625a06ab505718f86c58276b1f0cd99954c0b0
        André Rømcke made changes -
        Status Development review [ 10006 ] Development Review done [ 10028 ]
        André Rømcke made changes -
        Status Development Review done [ 10028 ] Documentation done [ 10011 ]
        Rui Silva (Inactive) made changes -
        Status Documentation done [ 10011 ] QA [ 10008 ]
        Assignee André Rømcke [ andre.romcke@ez.no ] Rui Silva [ rui.silva@ez.no ]
        Hide
        Rui Silva (Inactive) added a comment -

        Approved by QA.
        Tested on 5.2, 5.3 and master.

        Show
        Rui Silva (Inactive) added a comment - Approved by QA. Tested on 5.2, 5.3 and master.
        Rui Silva (Inactive) made changes -
        Assignee Rui Silva [ rui.silva@ez.no ]
        Status QA [ 10008 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Rui Silva (Inactive) made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Rui Silva (Inactive) made changes -
        Remaining Estimate 7 hours, 15 minutes [ 26100 ] 4 hours, 15 minutes [ 15300 ]
        Time Spent 45 minutes [ 2700 ] 3 hours, 45 minutes [ 13500 ]
        Worklog Id 50639 [ 50639 ]
        Rui Silva (Inactive) made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Rui Silva (Inactive) logged work - 18/Sep/14 7:58 PM
        • Time Spent:
          3 hours
           

          tested and closed

        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 63807 ] EZ* Development Workflow [ 85195 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 85195 ] EZEE Development Workflow [ 123989 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        5m 37s 1 ricardo.correia@ez.no 04/Jul/14 6:19 PM
        Confirmed Confirmed InputQ InputQ
        2d 15h 6m 1 Paulo Lopes (Inactive) 07/Jul/14 9:25 AM
        InputQ InputQ Development Development
        64d 2h 26m 1 André Rømcke 09/Sep/14 11:52 AM
        Development Development Development Review Development Review
        7d 23h 30m 1 André Rømcke 17/Sep/14 11:22 AM
        Development Review Development Review Development Review done Development Review done
        1d 2h 50m 1 André Rømcke 18/Sep/14 2:13 PM
        Development Review done Development Review done Documentation Review done Documentation Review done
        2m 28s 1 André Rømcke 18/Sep/14 2:15 PM
        Documentation Review done Documentation Review done QA QA
        18m 28s 1 rui.silva@ez.no 18/Sep/14 2:34 PM
        QA QA Closed Closed
        2h 53m 1 rui.silva@ez.no 18/Sep/14 5:28 PM
        Closed Closed Reopened Reopened
        30m 21s 1 rui.silva@ez.no 18/Sep/14 5:58 PM
        Reopened Reopened Closed Closed
        1s 1 rui.silva@ez.no 18/Sep/14 5:58 PM

          People

          • Assignee:
            Unassigned
            Reporter:
            Ricardo Correia (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Time Spent - 3 hours, 45 minutes Remaining Estimate - 4 hours, 15 minutes
              4h 15m
              Logged:
              Time Spent - 3 hours, 45 minutes Remaining Estimate - 4 hours, 15 minutes
              3h 45m

                Agile