datacube.drivers.common_psql.has_role_membership#
- datacube.drivers.common_psql.has_role_membership(conn, group_role, role, admin=False)[source]#
Check whether an extending role has been granted a base role.
- Parameters:
conn (
Connection) – A SQLAlchemy connection objectgroup_role (
UserRoleBase) – The base role, the role that should be granted. The group role that the other role is a member of.role (
UserRoleBase) – The extending role, the role that should have the group role granted to it, so that it can extend it with additional permissions. The role that is a member of the group role.
- Return type:
- Returns:
True if role is a member of the group_role.