def security_cleanup():
    """
    Cleanup unused permissions from views and roles.
    """
    current_app.appbuilder.security_cleanup()
    click.echo(click.style("Finished security cleanup", fg="green"))

    Cleanup unused permissions from views and roles.
    
flask_appbuilder/cli.py