def roles_remove(user, role):
    """Remove user from role."""
    user, role = _datastore._prepare_role_modify_args(user, role)
    if user is None:
        raise click.UsageError('Cannot find user.')
    if role is None:
        raise click.UsageError('Cannot find role.')
    if _datastore.remove_role_from_user(user, role):
        click.secho('Role "{0}" removed from user "{1}" '
                    'successfully.'.format(role, user), fg='green')
    else:
        raise click.UsageError('Cannot remove role from user.')
def roles_remove ( user , role ) : user , role = _datastore . _prepare_role_modify_args ( user , role ) if user is None : raise click . UsageError ( 'Cannot find user.' ) if role is None : raise click . UsageError ( 'Cannot find role.' ) if _datastore . remove_role_from_user ( user , role ) : click . secho ( 'Role "{0}" removed from user "{1}" ' 'successfully.' . format ( role , user ) , fg = 'green' ) else : raise click . UsageError ( 'Cannot remove role from user.' )
Remove user from role.