Skip to content

143: Replace OIDC-mapping settings functions with admin config snippets - #183

Merged
JaeYeonLee0621 merged 9 commits into
mainfrom
143-snippets
Sep 9, 2026
Merged

JaeYeonLee0621 merged 9 commits into
mainfrom
143-snippets

Conversation

@JaeYeonLee0621

@JaeYeonLee0621 JaeYeonLee0621 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
  • Added a new ADMIN_SUPERUSER_EMAILS setting
  • SnippetAdmin is restricted to superusers whose email is on ADMIN_SUPERUSER_EMAILS
  • Create base ConfigSnippet class in management/snippets.py

@JaeYeonLee0621 JaeYeonLee0621 self-assigned this Aug 24, 2026
@JaeYeonLee0621
JaeYeonLee0621 marked this pull request as draft August 24, 2026 13:14
@JaeYeonLee0621
JaeYeonLee0621 marked this pull request as ready for review August 25, 2026 10:35
ADMIN_GROUP = os.getenv("ADMIN_GROUP", "")
ADMIN_SUPERUSER_EMAILS = [
e.strip().lower() for e in os.getenv("ADMIN_SUPERUSER_EMAILS", "").split(",") if e.strip()
]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝

  1. ADMIN_GROUP : is_staff + is_superuser
  2. ADMIN_SUPERUSER_EMAILS : is_staff + is_superuser + access Snippet Admin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like ADMIN_SUPERUSER_EMAILS is not documented anywhere though!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! I added the explanation in admin.md documents, this part Auto-admin via ADMIN_SUPERUSER_EMAILS

Comment thread aqueduct/management/snippets.py

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nit-picks and minor improvement suggestions only. Overall this really looks great! 🚀

Comment thread aqueduct/management/templates/admin/management/snippet/test_console.html Outdated
Comment thread aqueduct/management/tests/test_snippet_admin.py
Comment thread aqueduct/management/tests/test_snippet_admin.py
Comment thread docs/user-guide/admin.md Outdated
Comment thread docs/user-guide/admin.md Outdated
Comment thread aqueduct/management/admin.py Outdated
Comment thread aqueduct/management/auth.py Outdated
Comment thread aqueduct/management/tests/test_snippet_admin.py
Comment thread aqueduct/management/auth.py Outdated
Comment thread aqueduct/management/tests/test_oauth_user_role.py Outdated
ADMIN_GROUP = os.getenv("ADMIN_GROUP", "")
ADMIN_SUPERUSER_EMAILS = [
e.strip().lower() for e in os.getenv("ADMIN_SUPERUSER_EMAILS", "").split(",") if e.strip()
]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! I added the explanation in admin.md documents, this part Auto-admin via ADMIN_SUPERUSER_EMAILS

Comment thread aqueduct/management/admin.py
Comment thread docs/user-guide/admin.md

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Feel free to merge it whenever you have time :)

@JaeYeonLee0621

Copy link
Copy Markdown
Contributor Author

Thanks for the review! :) I'll merge it once Matthias checks it

@JaeYeonLee0621
JaeYeonLee0621 merged commit 45c2c23 into main Sep 9, 2026
3 checks passed
@JaeYeonLee0621
JaeYeonLee0621 deleted the 143-snippets branch September 9, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make auth functions configurable via Snippets in DB + Plugin setup

2 participants