Page MenuHomePhabricator

[lib] Add `rolesWithoutSpecialRoleField` filter to `rawThreadInfoFromServerThreadInfo`
ClosedPublic

Authored by atul on Feb 7 2024, 1:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 9:35 AM
Unknown Object (File)
Fri, Nov 8, 10:03 PM
Unknown Object (File)
Fri, Nov 8, 7:14 PM
Unknown Object (File)
Fri, Nov 8, 7:14 PM
Unknown Object (File)
Fri, Nov 8, 7:14 PM
Unknown Object (File)
Fri, Nov 8, 1:36 PM
Unknown Object (File)
Oct 4 2024, 12:17 AM
Unknown Object (File)
Oct 4 2024, 12:17 AM
Subscribers

Details

Summary

This is to strip specialRoles out of roles before it's included in the rawThreadInfo: any that's being constructed.

ServerThreadInfo.roles contain specialRole, but RawThreadInfo does not. This change ensures that we construct a properly formed RawThreadInfo.

We will patch the specialRole field back in to minimally encoded RawThreadInfos for future clients (where shouldMinimallyEncodePermissions AND includeSpecialRoleFieldInRoles are true).

This makes D10107 safe to land since as of this diff we're stripping out the specialRole field altogether so there shouldn't be issues with any validators.


Depends on D10975

Test Plan

Logged result of function before and observed specialRole:

e817a0.png (734×1 px, 208 KB)

Logged result of function after and observed ABSENCE of specialRole:

524c3b.png (606×1 px, 187 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

We will patch the specialRole field back in to minimally encoded RawThreadInfos for future clients (where shouldMinimallyEncodePermissions AND includeSpecialRoleFieldInRoles are true).

Is it something already handled in the stack?

This revision is now accepted and ready to land.Feb 8 2024, 2:27 AM

We will patch the specialRole field back in to minimally encoded RawThreadInfos for future clients (where shouldMinimallyEncodePermissions AND includeSpecialRoleFieldInRoles are true).

Is it something already handled in the stack?

Will be handled in subsequent diff in the stack

This revision was landed with ongoing or failed builds.Feb 8 2024, 9:39 AM
This revision was automatically updated to reflect the committed changes.