Helper for adding permissions to roles
Fix WebUI functional tests