diff --git a/swh/core/db/db_utils.py b/swh/core/db/db_utils.py --- a/swh/core/db/db_utils.py +++ b/swh/core/db/db_utils.py @@ -662,3 +662,12 @@ "Asked for flavor %s, but module does not support database flavors", flavor, ) + + # Grant read-access to guest user on all tables of the schema + with connect_to_conninfo(db_or_conninfo) as db: + if not db: + return None + + with db.cursor() as c: + query = "grant select on all tables in schema public to guest" + c.execute(query)