Skip to content

Comments

feat(slack): add permission policy support#27

Closed
hrygo wants to merge 5 commits intomainfrom
feat/slack-permission-policy
Closed

feat(slack): add permission policy support#27
hrygo wants to merge 5 commits intomainfrom
feat/slack-permission-policy

Conversation

@hrygo
Copy link
Owner

@hrygo hrygo commented Feb 24, 2026

Summary

Add permission policy support for Slack adapter, enabling fine-grained control over who can interact with the bot.

Changes

  • Add DMPolicy config option (allow/pairing/block)
  • Add GroupPolicy config option (allow/mention/block)
  • Add AllowedUsers whitelist for user access control
  • Add BlockedUsers blacklist for user blocking
  • Add IsUserAllowed() and ShouldProcessChannel() methods
  • Integrate permission checks in message handling pipeline

Context

Permission policy is essential for production deployments. This addresses the "权限策略(DM/Group)" gap identified in the comparison report. Now administrators can control:

  • Who can DM the bot
  • Who can interact in group channels
  • Explicit allowlists and blocklists

Testing

  • Test DMPolicy "block" blocks all DMs
  • Test BlockedUsers prevents specific users
  • Test AllowedUsers restricts to whitelist

Related

黄飞虹 added 5 commits February 25, 2026 01:42
- Add Reaction type to base.RichContent
- Add AddReaction method to Slack adapter
- Integrate reactions into defaultSender
- Add SlashCommand type
- Add slash command handler at /slack endpoint
- Add SetSlashCommandHandler for custom processing
- Validate bot token format (xoxb-*-*-*)
- Validate app token format (xapp-*-*-*)
- Validate signing secret length and format
- Validate server address format
- Add DMPolicy and GroupPolicy config options
- Add AllowedUsers and BlockedUsers whitelist/blacklist
- Add IsUserAllowed and ShouldProcessChannel methods
- Integrate permission checks in message handling
@hrygo hrygo closed this Feb 24, 2026
@hrygo hrygo deleted the feat/slack-permission-policy branch February 24, 2026 19:36
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.

Slack 实现与 OpenClaw 对比报告:功能差距分析与建议

1 participant