ui: js: permissions: small template fix
ui: js: permissions: make controller more resilient (also faster)