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 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:13 PM
Unknown Object (File)
Wed, Dec 11, 6:32 PM
Unknown Object (File)
Mon, Dec 2, 8:44 AM
Unknown Object (File)
Sun, Dec 1, 4:47 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
Lint Not Applicable
Unit
Tests Not Applicable

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