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)
Thu, Dec 26, 9:09 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Sun, Dec 1, 8:05 PM
Unknown Object (File)
Fri, Nov 29, 5:37 PM
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
Branch
arcpatch-D10990 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.