Page MenuHomePhabricator

[keyserver] Run num admin change checks in updateRole only if intended role is not an admin
ClosedPublic

Authored by will on Oct 30 2024, 1:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 2, 8:44 AM
Unknown Object (File)
Sun, Dec 1, 4:47 PM
Unknown Object (File)
Sat, Nov 30, 10:22 PM
Unknown Object (File)
Fri, Nov 29, 7:05 AM
Unknown Object (File)
Fri, Nov 29, 3:04 AM
Unknown Object (File)
Thu, Nov 28, 9:09 PM
Unknown Object (File)
Thu, Nov 28, 3:08 PM
Unknown Object (File)
Thu, Nov 28, 3:08 PM
Subscribers

Details

Summary

Ran into an issue with running updateRole with a ghost commbot viewer to set the communityAdminID for createTaggedFarcasterCommunity causing a invalid_parameters as the changed admin count was equal to the current number of community admins.
This diff allows us to skip over this check if the request is to change members to admins

Depends on D13833

Test Plan

Was able to successfully update the role for the prospective comm user admin to an actual admin as confirmed by the iOS simualtor's chat list without encountering invalid_parameters.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will requested review of this revision.Oct 30 2024, 1:47 PM
will retitled this revision from [keyserver] Run num admin change checks in updateRole only if request is not by an admin to [keyserver] Run num admin change checks in updateRole only if intended role is not an admin.Oct 30 2024, 2:18 PM
This revision is now accepted and ready to land.Oct 30 2024, 2:41 PM