Skip to content

Comments

feat(slack): add permission policy support#31

Open
hrygo wants to merge 3 commits intomainfrom
feat/slack-permission-policy-v2
Open

feat(slack): add permission policy support#31
hrygo wants to merge 3 commits intomainfrom
feat/slack-permission-policy-v2

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

@hrygo hrygo force-pushed the feat/slack-permission-policy-v2 branch 2 times, most recently from ad56d1f to 9a86e4d Compare February 24, 2026 19:40
黄飞虹 added 3 commits February 25, 2026 05:13
- Add DMPolicy and GroupPolicy config options
- Add AllowedUsers and BlockedUsers whitelist/blacklist
- Add IsUserAllowed and ShouldProcessChannel methods
- Integrate permission checks in message handling
- Fix pool.go to clean absolute paths with . or .. elements
- Fix test code to replicate correct path resolution logic
- Add tilde expansion support in expandPathFixed test helper
@hrygo hrygo force-pushed the feat/slack-permission-policy-v2 branch from ce6a3a9 to 5bc6dc5 Compare February 24, 2026 21:13
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