virto-network / virto-node

Virto Network blockchain node.
GNU General Public License v3.0
21 stars 10 forks source link

Configurable "EnsureRank" origin to add/remove members #413

Open olanod opened 2 months ago

olanod commented 2 months ago

The current runtime configuration for adding/removing members of a community uses the same origin(MemberMgmtOrigin = EitherOf<EnsureCommunity<Self>, EnsureCommunityAccount>) that is the same for every community, new members are added via community referendum or by the admin origin. It's fine in most cases but for bigger communities with no admin it can be cumbersome to run a referendum every time for a new member, e.g. a commercial community might want to add regular customers as members on signup without exposing that fact.

The more convenient thing to do is to trust certain members of the community to be able to on-board people freely. Ranks can be used to filter what sub-set of members of the community have the privilege to add new users. A default "Rank::MAX" basically means the setting is ignored, a very permissive community on the other hand can configure a "Rank::MIN" that allows anyone to add anyone else, note that we should have a different origin for removing members as communities with permissive policies for admission probably don't want provide the same freedom for removing anyone in the community.