1.3 KiB
title, date, priority, area, files, g15office
| title | date | priority | area | files | g15office | |||
|---|---|---|---|---|---|---|---|---|
| Make pinning in public channels a manage action, and check the pinned message belongs to the channel | 2026-11-03 | high | sm-chatchannels-plugin (classes/channel_service.go, api/pins.go), sm-demo-app plugins/demo/classes/chat_context.go |
|
Problem
chatchannels gates PinMessage and UnpinMessage only with channel access, which the demo grants every member. So any visitor can unpin the seeded welcome pins or flood the pins panel. PinMessage also never checks that the message belongs to the channel's conversation.
Solution
Additively in chatchannels: PinMessage and UnpinMessage require CanManageContext, or an optional contracts.PinPolicy the host implements; the demo answers it from its moderator group. Verify message.conversation_id equals the channel's conversation before creating the pin. Meanwhile the demo layer can hide pin actions for non-moderators, but the server must enforce the rule.
Source: phase 20 code review (20-REVIEW.md WR-02).
Closed 2026-11-05
Fixed in quick 261105-oc6: sm-chatchannels-plugin a042536, sm-demo-app ce800f2/7e4b9d3/11d3afc. Untagged; sm-bm-app needs CanPin before it bumps.