BAN admin by id -- with consensus
context
- as of #449 and #408 we can
REMOVE
admins and subscribers by id - as of !528 (merged) we can
BAN
subscribers by id - so: let's add support for
BAN
ing admins by id, but require a consensus among all non-banned admins to enact
behavior
SUBJECT TO REVISION!!!
happy path
issuing ban proposal
GIVEN a channel with admins 1,2,3,4
- WHEN 1 issues
BAN @ADMIN_2
- THEN 3 and 4 receive a notification that says
@ADMIN_1 wants to BAN @ADMIN_2. If all other admins AGREE, @ADMIN_2 will be permanently banned from using this channel in any form. Please reply with AGREE or DISAGREE
deciding ban proposal
GIVEN a channel with admins 1,2,3,4 on which 1 has issued a BAN proposal against 2
- WHEN 3 and 4 reply with
AGREE
- THEN 2 receives a notification that they have been banned
- AND THEN any further attempts by 2 to interact with the channel are blocked (as per !528 (merged))
- AND THEN 1 receives a command response that the ban has been approved
- AND THEN 3 and 4 receive a notification that the BAN has been enacted
GIVEN a channel with admins 1,2,3,4 on which 1 has issued a BAN proposal against 2
- WHEN either 3 or 4 reply with
DISAGREE
- THEN 1,2,3, and 4 receive notifications that the BAN proposal has been rejected
- AND THEN the system removes all records of the ban proposal
expiring a ban proposal after 1 month
GIVEN a channel with admins 1,2,3,4 on which 1 has issued a BAN proposal against 2
- WHEN 3 weeks pass
- THEN 1,3, and 4 will receive a notification informing them they have 1 week left to decide the proposal before it expires
- WHEN 1 more week passes
- THEN 1,2,3, and 4 will receive a notification informing them that the BAN proposal against 2 has expired
- AND THEN the system deletes all records of the ban proposal
lack of quorum
GIVEN a channel with only 2 admins
- WHEN 1 issues
BAN @ADMIN_2
- THEN they receive a notification that says
Sorry, we only support banning admins on channels with 3 or more admins!
implementation notes
- as with #449 , we will now have to support polymorphic payload parsing for
BAN
, as we currently do withREMOVE
- the reminder notification and expiry require jobs. (maybe delete them or move into another card?)