Page MenuHomePhabricator

[lib] Introduce new permissions
AcceptedPublic

Authored by tomek on Wed, Mar 19, 7:46 AM.
Tags
None
Referenced Files
F5111626: D14462.diff
Wed, Apr 2, 4:32 AM
F5110088: D14462.diff
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
Unknown Object (File)
Fri, Mar 28, 5:03 AM
Unknown Object (File)
Wed, Mar 26, 8:49 PM
Unknown Object (File)
Wed, Mar 26, 2:47 PM
Subscribers
None

Details

Reviewers
kamil
ashoat
Summary
Test Plan

Tested in combination with the next diff. Checked if the permissions appear in the manage role UI.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Wed, Mar 19, 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.Wed, Mar 19, 9:38 AM
lib/types/thread-permission-types.js
448

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.