Page MenuHomePhabricator

[keyserver] Add dontCheckJoinPermissions override option to createThread for sidebar
AbandonedPublic

Authored by will on Tue, Oct 29, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 9:06 PM
Unknown Object (File)
Mon, Nov 11, 12:48 PM
Unknown Object (File)
Mon, Nov 11, 3:13 AM
Unknown Object (File)
Mon, Nov 11, 2:36 AM
Unknown Object (File)
Sun, Nov 10, 1:32 PM
Unknown Object (File)
Sun, Nov 10, 6:50 AM
Unknown Object (File)
Wed, Nov 6, 6:31 PM
Unknown Object (File)
Mon, Nov 4, 8:02 PM
Subscribers

Details

Reviewers
varun
ashoat
Summary

This adds the dontCheckJoinPermissions option to createThread. commbot when creating the sidebar will require this as it will not be a member

Depends on D13813

Test Plan

Tested later in the stack when used to create sidebars.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Tue, Oct 29, 3:40 PM
Harbormaster failed remote builds in B32414: Diff 45441!

rename dontCheckPermissions to dontCheckJoinPermissions

will requested review of this revision.Tue, Oct 29, 4:40 PM
ashoat requested changes to this revision.Tue, Oct 29, 7:06 PM
ashoat added inline comments.
keyserver/src/creators/thread-creator.js
65

This only applies for the changeRole for the viewer, not for the initial members / ghost members

I think we should either give it a more specific name to clarify that, or make it apply for all of the changeRole calls

367–369

I might be misremembering, but I recall we had settled on having a flag that would avoid adding a commbot as a member at all, eg. we would skip this changeRole entirely

Was there a reason that approach no longer made sense?

keyserver/src/updaters/thread-permission-updaters.js
93

This flag seems to do two things:

  • Ignore KNOW_OF check inside getRoleForPermissions
  • Ignore memberOfContainingThread check on line 257

It would be good to at least add a code comment explaining that both of these things are affected

This revision now requires changes to proceed.Tue, Oct 29, 7:06 PM
keyserver/src/creators/thread-creator.js
367–369

(I suppose we'd need to add commbot as a ghost at least)

keyserver/src/creators/thread-creator.js
367–369

I think we might have discussed having commbot as a ghost for the sidebar thread:

// if the tagger is a user on Comm, then:
// - call joinThread for them, not changeRole. we want the robotext
// - construct a viewer with them
// if the tagger is NOT a user on Comm, then:
// - call changeRole/commitMembershipChangeset for commbot
// - construct a viewer using commbot
// we'll use the same viewer to create the sidebar later

I was just working on a flag for not setting commbot to an admin. I think I approached it as setting commbot as a normal user first but I think setting it to a ghost user altogether makes sense to me. As you said, it removes the need to remove commbot

will marked an inline comment as not done.Tue, Oct 29, 7:40 PM
keyserver/src/creators/thread-creator.js
367–369

I wrote the above comment with a misunderstanding. I'm thinking back and now I think I understand.

Didn't think to just skip the entire changeRole entirely and still thought we needed a dont check permission option. Will update to just skip the changeRole

Abandoning. We're no longer planning to override permissions