Skip to content

Commit d7d5880

Browse files
jirhikerCopilot
andauthored
Update db/initialization.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 131f46e commit d7d5880

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

db/initialization.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
def _parse_app_read_members() -> list[str]:
2626
members = os.environ.get("APP_READ_MEMBERS", "")
2727
parsed = [member.strip() for member in members.split(",") if member.strip()]
28-
# pygeoapi should always inherit the default read role.
28+
# NOTE: The "pygeoapi" database role is always added to APP_READ_MEMBERS.
29+
# This ensures the pygeoapi integration consistently inherits the default
30+
# read role ("app_read"), even if administrators do not list it explicitly
31+
# in the APP_READ_MEMBERS environment variable. When reviewing database
32+
# permissions or configuring roles, be aware that "pygeoapi" will always
33+
# receive read access via app_read if the role exists in the database.
2934
if "pygeoapi" not in {member.lower() for member in parsed}:
3035
parsed.append("pygeoapi")
3136
return parsed

0 commit comments

Comments
 (0)