chatops.permissions module
Permissions utilities for ChatOps commands.
Admin allowlist via ENV ADMIN_USER_IDS (comma-separated integers)
Optional chat allowlist via ENV ALLOWED_CHAT_IDS (comma-separated integers)
Decorators for admin-only and chat-allowlisted commands
- chatops.permissions.is_admin(user_id)[מקור]
Return True if user is admin.
Behavior when ADMIN_USER_IDS is empty: - By default (secure), no user is considered admin - If CHATOPS_ALLOW_ALL_IF_NO_ADMINS=1, treat empty allowlist as no restriction (all users admin)