Page MenuHomePhabricator

[native] Prevent the only admin role from being changed
ClosedPublic

Authored by rohan on Jun 9 2023, 11:45 AM.
Tags
None
Referenced Files
F3370322: D8161.diff
Tue, Nov 26, 2:00 AM
Unknown Object (File)
Fri, Nov 22, 6:48 PM
Unknown Object (File)
Fri, Nov 22, 6:33 PM
Unknown Object (File)
Fri, Nov 22, 6:33 PM
Unknown Object (File)
Thu, Nov 14, 3:41 PM
Unknown Object (File)
Thu, Nov 14, 3:26 PM
Unknown Object (File)
Thu, Nov 14, 3:16 PM
Unknown Object (File)
Wed, Nov 13, 1:19 AM

Details

Summary

Just like on web, we want to make sure the last remaining admin in a community cannot remove themselves from the role until someone else is assigned the Admins role

Depends on D8160

Test Plan

Please see the video below that demonstrates this

Diff Detail

Repository
rCOMM Comm
Branch
edit_roles
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan requested review of this revision.Jun 9 2023, 12:02 PM

(Shellcheck CI job should pass after pulling in latest changes.)

Planning changes to hold off on review until feedback on D8141 is addressed

Refactor the way we indicate a role change cannot be possible to be similar to web (block the user from getting into an invalid state all together)

atul added a subscriber: ted.
atul added inline comments.
native/roles/change-roles-screen.react.js
166–173

This seems like it would be a great candidate of something that could be included in design system... maybe NoticeBox? With InfoBox, WarningBox, ErrorBox` variants that have different icons/colors?

Nothing actionable with this diff, just a thought CC @ashoat, @ted

282

What's this for? Didn't catch it in the screen recording, maybe a layout debugging artifact that got left in?

If it is something we're using, can we use a color from the design system instead?

This revision is now accepted and ready to land.Jun 14 2023, 10:17 AM
native/roles/change-roles-screen.react.js
282

Oh yeah that's from debugging let me remove that

Remove unused green color

This revision was landed with ongoing or failed builds.Jun 21 2023, 8:42 AM
This revision was automatically updated to reflect the committed changes.