feat(config): add allow_all_channels / allow_all_users flags#476
Merged
thepagent merged 2 commits intoopenabdev:mainfrom Apr 19, 2026
Merged
feat(config): add allow_all_channels / allow_all_users flags#476thepagent merged 2 commits intoopenabdev:mainfrom
thepagent merged 2 commits intoopenabdev:mainfrom
Conversation
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
Reverts the empty-list-means-deny-all behavior from openabdev#398. With explicit allow_all_* flags (next commit), the empty-list hack is no longer needed — the flags become the single source of truth.
9fa361f to
2658ea4
Compare
Introduce explicit boolean flags to replace overloaded empty-list semantics for allowed_channels and allowed_users. Both flags default to true (allow all). When not explicitly set in config, auto-detected from the list: non-empty list → false, empty list → true. This ensures zero config changes for any existing deployment. Truth table: allow_all_* = true → allow all (list ignored) allow_all_* = false + list non-empty → only listed allow_all_* = false + list empty → deny all Helm chart always renders explicit flags (auto-inferred from list if user does not set the flag), so the Rust runtime sees fully resolved values. Closes openabdev#475
2658ea4 to
c577e73
Compare
Collaborator
Author
|
LGTM ✅ Clean implementation of explicit Backward compatibility verified for all deployment scenarios (pre-#398, post-#398, new). Helm nil guards handle edge cases properly. |
thepagent
approved these changes
Apr 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce explicit boolean flags
allow_all_channelsandallow_all_usersto replace the overloaded empty-list semantics, and revert #398 (emptyallowed_channelsno longer denies all).Changes
1. Revert #398
Restores
allowed_channels = []to mean allow-all (original behavior). With explicit flags, the empty-list hack is no longer needed.2. New flags with auto-detect
Both flags default to
true(allow all). When not explicitly set inconfig.toml, auto-detected from the list:allow_all_*allowed_*true(default)false["123"]false[]3. Helm always renders explicit flags
Files Changed
src/config.rs:Option<bool>fields +resolve_allow_all()helpersrc/discord.rs: Channel/user filtering uses resolved flagssrc/slack.rs: Samesrc/main.rs: Resolves flags, logs them, warns on deny-all scenarioscharts/openab/templates/configmap.yaml: Always renders explicit flagscharts/openab/values.yaml: Documents new flagsconfig.toml.example: Documents new flagsBackward Compatibility
Zero config changes required for any existing deployment:
allowed_channels = []): auto-inferred asallow_all_channels = true✓allowed_channels = ["123"]): auto-inferred asallow_all_channels = false✓allowed_users = []: auto-inferred asallow_all_users = true✓Closes #475