def privileges_list(
        name,
        object_type,
        prepend='public',
        maintenance_db=None,
        user=None,
        host=None,
        port=None,
        password=None,
        runas=None):
    object_type = object_type.lower()
    query = _make_privileges_list_query(name, object_type, prepend)

    if object_type not in _PRIVILEGES_OBJECTS:
        raise SaltInvocationError(
            'Invalid object_type: {0} provided'.format(object_type))

    rows = psql_query(
        query,
        runas=runas,
        host=host,
        user=user,
        port=port,
        maintenance_db=maintenance_db,
        password=password)

    ret = {}

    for row in rows:
        if object_type != 'group':
            result = row['name']
            result = result.strip('{}')
            parts = result.split(',')
            for part in parts:
                perms_part, _ = part.split('/')
                rolename, perms = perms_part.split('=')
                if rolename == '':
                    rolename = 'public'
                _tmp = _process_priv_part(perms)
                ret[rolename] = _tmp
        else:
            if row['admin_option'] == 't':
                admin_option = True
            else:
                admin_option = False

            ret[row['rolname']] = admin_option

    return ret
.. versionadded:: 2016.3.0
dataset/ETHPy150Open saltstack/salt/salt/modules/postgres.py/privileges_list