refactor permission UI