Page MenuHomePhabricator

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

Authored by will on Wed, Oct 30, 1:00 PM.
Tags
None
Referenced Files
F3104730: D13834.diff
Wed, Oct 30, 6:23 PM
F3104469: D13834.id45484.diff
Wed, Oct 30, 5:18 PM
F3104438: D13834.id.diff
Wed, Oct 30, 5:18 PM
F3104393: D13834.diff
Wed, Oct 30, 5:16 PM
Subscribers

Details

Reviewers
ashoat
varun
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.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