Page MenuHomePhabricator

[native] Update update-roles-and-permissions-test-data.js to include specialRole field
AbandonedPublic

Authored by atul on Nov 30 2023, 1:16 PM.
Tags
None
Referenced Files
F3523638: D10115.id34074.diff
Mon, Dec 23, 9:54 AM
F3523335: D10115.id34142.diff
Mon, Dec 23, 8:58 AM
F3522270: D10115.diff
Mon, Dec 23, 6:18 AM
Unknown Object (File)
Wed, Dec 18, 1:20 AM
Unknown Object (File)
Wed, Dec 18, 1:19 AM
Unknown Object (File)
Wed, Dec 18, 1:19 AM
Unknown Object (File)
Wed, Dec 18, 1:19 AM
Unknown Object (File)
Fri, Dec 13, 11:57 PM
Subscribers

Details

Reviewers
ginsu
tomek
rohan
Summary

There are some places in the codebase that we hardcode isDefault. Here, we'll want to introduce the specialRole field alongside, so when we deprecate isDefault, no additional changes will be needed. Some are important (like one instance in thread-utils.js and the instance in role-creator.js where we set up initial roles for threads), and others are just test data. Nonetheless, I thought I may as well update all of them for consistency.

Part of ENG-5993

This diff handles update-roles-and-permissions-test-data.js

Depends on D10114

Test Plan

Ran yarn workspace native test to make sure unit tests still passed

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan held this revision as a draft.
rohan published this revision for review.Nov 30 2023, 1:33 PM
native/redux/update-roles-and-permissions-test-data.js
9582

We should use a constant

Use constant for specialRole

This revision is now accepted and ready to land.Dec 1 2023, 1:57 PM
atul edited reviewers, added: rohan; removed: atul.
This revision now requires review to proceed.Feb 5 2024, 12:44 PM
native/redux/update-roles-and-permissions-test-data.js
9647 ↗(On Diff #34142)

Does it make sense to introduce a new special role?

This revision is now accepted and ready to land.Feb 6 2024, 12:52 AM