We can use specialRole field and roleIsDefaultRole and roleIsAdminRole utilities directly instead of doing this in a separate hook.
Depends on D11206
Paths
| Differential D11208 Authored by atul on Mar 1 2024, 12:57 PM.
Details Summary We can use specialRole field and roleIsDefaultRole and roleIsAdminRole utilities directly instead of doing this in a separate hook. Depends on D11206 Test Plan Make sure that RoleActionsMenu appears and behaves as expected. Will put screenshots in here shortly:
Diff Detail
Event TimelineHerald added a subscriber: ashoat. · View Herald TranscriptMar 1 2024, 12:58 PM2024-03-01 12:58:01 (UTC-8) Harbormaster completed remote builds in B27257: Diff 37734.Mar 1 2024, 1:13 PM2024-03-01 13:13:33 (UTC-8) Comment Actions We should reintroduce the util (probably as a simple function) if we would need to decide if we can edit / delete a role in some other places. This revision is now accepted and ready to land.Mar 4 2024, 1:05 AM2024-03-04 01:05:14 (UTC-8) Comment Actions This is safe to land because we will fall back to previous roleIsAdminRole and roleIsDefaultRole logic if specialRole field is missing (as it will on web when landed prior to "flipping the switch").
Yeah, agree but figure this reduces indirection for time being when there's a single instance. Harbormaster completed remote builds in B27605: Diff 38199.Mar 19 2024, 10:49 AM2024-03-19 10:49:41 (UTC-7) Closed by commit rCOMM49bcd23b617f: [lib] Deprecate `useRoleDeletableAndEditableStatus` and determine `is… (authored by atul). · Explain WhyMar 19 2024, 10:51 AM2024-03-19 10:51:39 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 38199 lib/utils/role-utils.js
web/roles/role-actions-menu.react.js
|