joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Cleanup membershp module

Open bedeho opened this issue 7 years ago • 1 comments

Both module storage and interface need to be cleaned up.

The storage and forum client modules need the old interface, and thus storage model, to work, so we have postponed.

  1. Drop storage fields

pub MemberIdsByRootAccountId get(member_ids_by_root_account_id) : map T::AccountId => Vec<T::MemberId>;

// Mapping of a controller account id to vector of member ids it controls
pub MemberIdsByControllerAccountId get(member_ids_by_controller_account_id) : map T::AccountId => Vec<T::MemberId>;

and all modules that depend on them.

  1. No method shall identify members through accounts, but we can have checker methods (return bool) that can verify the validity of a provided account.

  2. Change Profile to Membership, and storage field MemberProfile to MembershipById. Its far less confusing.

  3. MembersCreated => NextMemberId

  4. Handles => MemberIdByHandle

  5. Drop UserInfo, does nothing.

  6. Drop Option wrapper for around value types of maps, e.g. MemberProfile.

bedeho avatar Nov 14 '19 15:11 bedeho

Closed by https://github.com/Joystream/joystream/pull/490

iorveth avatar May 24 '21 17:05 iorveth