cambiatus / backend

Cambiatus GraphQL API
GNU Affero General Public License v3.0
21 stars 18 forks source link

Update news to use roles 🗞 #241

Open lucca65 opened 2 years ago

lucca65 commented 2 years ago

Update our news and Communication feature to allow users with a certain role to be able to edit, create and delete news.

This sugestiona came from @iamluizhadad where in Muda, some validators already work as a "semi-admin", helping the core team to admin the community. They already work as a collective, but the app is still focused on a single user admin.

Data Migration phase

  1. Create a role for validators
  2. Add all current validators to this new role. That is, get all users that are validator in any action on Muda and add them to this new role

Programming phase

  1. Modify/create mutations that allow changes to news if the user has the appropriate roles with enough permissions
  2. Plan queries modifications for the frontend to consume
  3. We should also plan to store modification history, so who changed the news, and with what role they had at the time to do so