Page MenuHomePhabricator

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

Authored by will on Wed, Oct 30, 1:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 5:06 PM
Unknown Object (File)
Fri, Nov 15, 7:02 AM
Unknown Object (File)
Fri, Nov 15, 12:06 AM
Unknown Object (File)
Fri, Nov 15, 12:06 AM
Unknown Object (File)
Thu, Nov 14, 9:03 PM
Unknown Object (File)
Wed, Nov 13, 12:34 AM
Unknown Object (File)
Sun, Nov 10, 2:11 PM
Unknown Object (File)
Sat, Nov 9, 6:03 AM
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.Wed, Oct 30, 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.Wed, Oct 30, 2:18 PM
This revision is now accepted and ready to land.Wed, Oct 30, 2:41 PM