rewrite permission string as angular filter