We can use specialRole field and roleIsDefaultRole and roleIsAdminRole utilities directly instead of doing this in a separate hook.
Depends on D11206
Differential D11208
[lib] Deprecate `useRoleDeletableAndEditableStatus` and determine `is[Editable/Deletable]` directly in `RoleActionsMenu` atul on Mar 1 2024, 12:57 PM. Authored by Tags None Referenced Files
Subscribers
Details We can use specialRole field and roleIsDefaultRole and roleIsAdminRole utilities directly instead of doing this in a separate hook. Depends on D11206 Make sure that RoleActionsMenu appears and behaves as expected. Will put screenshots in here shortly:
Diff Detail
Event TimelineComment 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. 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. |