A section can not be removed if it's assigned to some contents OR it is used in some roles.
Permissions UI granularity
Policy "Edit limitations" button should be disabled when there is nothing to edit
Tested and approved by QA for master.
Merged in master:
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.
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.
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 [~email@example.com]...?