docs: document admin-only ban/unban/blocked commands and ENV - #3225
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the permissions documentation to mark Flow diagram for admin-only ban/unban/blocked commands and BLOCKED_USER_IDS ENVflowchart TD
Admin[Admin user] -->|/ban| BotCheckAdmin[Check ADMIN_USER_IDS]
BotCheckAdmin -->|is admin| BanUser[Apply ban to target user]
Admin -->|/unban| UnbanRequest[Request unban for target user]
UnbanRequest --> UnbanCheckBlockedEnv[Check BLOCKED_USER_IDS]
UnbanCheckBlockedEnv -->|user in BLOCKED_USER_IDS| UnbanDenied[Unban denied]
UnbanCheckBlockedEnv -->|user not in BLOCKED_USER_IDS| UnbanApplied[Remove ban]
AnyUser[Any user] -->|/blocked| BlockedCommand[Show blocked users]
subgraph EnvConfig[ENV configuration]
ADMIN[ADMIN_USER_IDS]
BLOCKED[BLOCKED_USER_IDS]
end
ADMIN --> BotCheckAdmin
BLOCKED --> UnbanCheckBlockedEnv
note1[Admins are never blocked] --> Admin
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider clarifying how
BLOCKED_USER_IDSinteracts withADMIN_USER_IDS(e.g., explicit precedence rules) to avoid ambiguity when a user ID appears in both lists.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments- Consider clarifying how `BLOCKED_USER_IDS` interacts with `ADMIN_USER_IDS` (e.g., explicit precedence rules) to avoid ambiguity when a user ID appears in both lists.
## Individual Comments### Comment 1
<locationpath="docs/chatops/permissions.md"line_range="8" />
<code_context>
- הגדרת אדמינים ב-ENV: `ADMIN_USER_IDS="123,456"`- הגבלת צ'אטים: `ALLOWED_CHAT_IDS="-100123,-100456"`- קירור לפקודות רגישות: `SENSITIVE_COMMAND_COOLDOWN_SEC` (ברירת מחדל: 5 שניות)
+- משתמשים חסומים ברמת ENV: `BLOCKED_USER_IDS="123,456"` (לא ניתן לשחרור דרך `/unban`, אדמינים לעולם לא נחסמים)
</code_context>
<issue_to_address>
**issue (typo):** Consider correcting the phrase "לא ניתן לשחרור" to a more grammatically accurate form.
Because the subject "משתמשים חסומים" is plural, please adjust the phrase to a grammatically consistent form such as "לא ניתנים לשחרור" or rephrase to the infinitive "לא ניתן לשחרר" for smoother reading.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Uh oh!
There was an error while loading. Please reload this page.
⏱️ Performance report(No performance test durations collected. Mark tests with |
📖 Documentation PreviewThe documentation has been built successfully!
To view locally:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.
Update documentation for #3222
Updated the permissions documentation to include additional admin-only sensitive commands:
/ban,/unban, and/blocked. It also added a newBLOCKED_USER_IDSENV setting to define blocked users, noting they cannot be unbanned via/unbanand that admins are never blocked.Generated by Dosu
Summary by Sourcery
Documentation: