Details
- Reviewers
kamil ashoat - Commits
- rCOMM7e031e9590fa: [lib] Introduce delete message permissions
Tested in combination with the next diff. Checked if the permissions appear in the manage role UI.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I don't remember all the places where we need to add a new permission. Wondering if you modelled this on another diff that introduced a different permission – if so, would be helpful to share a link to that diff.
lib/types/thread-permission-types.js | ||
---|---|---|
448 ↗ | (On Diff #47460) | Typo: capital L |
Based it partially on https://phab.comm.dev/D12062, but also checked all the places where threadPermissions.EDIT_MESSAGE was used, as the new permissions should behave quite similarly. There is one place I'm not sure of: threadPermissionsRemovedForGenesisMembers - we include threadPermissions.EDIT_MESSAGE there, but I'm not sure why. In the most recent revision I didn't add the new permissions there.
Interesting. I guess the thinking was if you can't send a message, you shouldn't be able to edit a message? I think it doesn't really matter, since you can only edit your own messages anyways. Same thing goes for deleting messages, so it's okay to omit.