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

The delete button in section view/list should be disabled if the section can not be removed

    Details

      Description

      A section can not be removed if it's assigned to some contents OR it is used in some roles.

        Issue Links

          Activity

          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.
          Show
          Gunnstein Lye added a comment - Merged in master: https://github.com/ezsystems/ezpublish-kernel/commit/1d867c1ce749a801402fb3aecc40992844e20a8a https://github.com/ezsystems/PlatformUIBundle/commit/a9c69ee78ada0abbc5ea87534472438da141188c
          Show
          Gunnstein Lye added a comment - - edited PR: https://github.com/ezsystems/ezpublish-kernel/pull/1493 https://github.com/ezsystems/PlatformUIBundle/pull/415
          Hide
          Gunnstein Lye added a comment -

          Right, it's nearly time for the 1st year anniversary Ok, I'll try out my theory. The section list isn't paginated yet, but that's a separate story and fixing this bug now won't make that any harder I think.

          Show
          Gunnstein Lye added a comment - Right, it's nearly time for the 1st year anniversary Ok, I'll try out my theory. The section list isn't paginated yet, but that's a separate story and fixing this bug now won't make that any harder I think.
          Hide
          Yannick Roger (Inactive) added a comment -

          It's been a while And my code has been refactored since I opened this issue.

          You can have a look with today's architecture. Just keep in mind the performances as this is a list and it can contain a certain number of items so the count must be quite optimized.

          Show
          Yannick Roger (Inactive) added a comment - It's been a while And my code has been refactored since I opened this issue. You can have a look with today's architecture. Just keep in mind the performances as this is a list and it can contain a certain number of items so the count must be quite optimized.
          Hide
          Gunnstein Lye added a comment -

          Is this really blocked by EZP-23738 "Permissions UI granularity"? The section controller is already checking the number of content objects assigned to each section, we just need to add the count for roles using each section. The gateway has a `countContentObjectsInSection($id)`, it should be easy enough to add a `countRolesUsingSection($id)`. What say you [~yannick.roger@ez.no]...?

          Show
          Gunnstein Lye added a comment - Is this really blocked by EZP-23738 "Permissions UI granularity"? The section controller is already checking the number of content objects assigned to each section, we just need to add the count for roles using each section. The gateway has a `countContentObjectsInSection($id)`, it should be easy enough to add a `countRolesUsingSection($id)`. What say you [~yannick.roger@ez.no] ...?

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 50 minutes
                2d 50m