hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
66 stars 41 forks source link

Migrate RolesController into react-query #8285

Closed masvelio closed 8 hours ago

masvelio commented 4 weeks ago
masvelio commented 2 weeks ago

per yesterday’s discussion, assigning to @jnaviask

jnaviask commented 2 weeks ago

Branching off @mzparacha's work in #8312 as it has a lot of overlap.

jnaviask commented 1 week ago

As discussed with @masvelio:

next step as I would like to do it is:

  • Add roles as a member on Account or AddressInfo, replicating the roles information
  • Replace role functions to pull from Account/AddressInfo rather than as a separate object and ensure the population matches the derived Roles objects we currently create)
  • Migrate the required functions to a different controller/store, simplifying or eliminating them when possible (e.g. if we can determine a role simply by checking address.role, then we should, with a very simple global helper, as opposed to something convoluted), then eliminate the Roles controller

Can also in parallel investigate the removal of any lingering Roles code from the platform, but that would be a diff ticket

jnaviask commented 1 week ago

Update: after investigation, the main usage of roles is to distinguish admins/mods from members. Intuitively, admin/mod lists should live on the community instead of on the address object. I will attempt to move forward with community-owned roles.