Page MenuHomePhabricator

[lib] Introduce delete message permissions
ClosedPublic

Authored by tomek on Mar 19 2025, 7:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 9, 4:21 AM
Unknown Object (File)
Fri, Apr 4, 12:27 PM
Unknown Object (File)
Fri, Apr 4, 9:47 AM
Unknown Object (File)
Wed, Apr 2, 4:32 AM
Unknown Object (File)
Tue, Apr 1, 10:03 PM
Unknown Object (File)
Mon, Mar 31, 12:30 PM
Unknown Object (File)
Mon, Mar 31, 11:22 AM
Unknown Object (File)
Fri, Mar 28, 7:53 PM
Subscribers
None

Details

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Mar 19 2025, 8:05 AM

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.

This revision is now accepted and ready to land.Mar 19 2025, 9:38 AM
lib/types/thread-permission-types.js
448 ↗(On Diff #47460)

Typo: capital L

Fix typo and stop filtering out the permission

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.

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.

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.

tomek retitled this revision from [lib] Introduce new permissions to [lib] Introduce delete message permissions.Thu, Apr 3, 8:12 AM
This revision was automatically updated to reflect the committed changes.