Permissions UI

This runs into problems when you have a dropdown inside a dropdown. Closest searched upwards and enters above the scope of this template. The new system searches from template root down, which makes it local to the dropdown this code controls.