tunapanda/wikonnect

[FEATURE] [BACKEND][WIK-109] Provision of user management by moderators and admins

Closed this issue · 0 comments

Describe the user story:

A frontend moderator, admin and super admin can view and/or alter user information using preset functions on the admin dashboard.

Tasks (where applicable)

  • Flagging user endpoint under already user routes
  • Change properties under userRoles in user object from name, type to id, type
  • Change server/route/admin.js file to to server/route/userRoles.js
  • Assign roles(userRoles routes)
    • Documentation on changing and assignment of roles
    • Change permissions to
      • Basic = Learner
      • Teacher = Teacher
      • Moderator = Moderator
      • Admin
      • SuperAdmin

Tests (where applicable)

  • Moderators can modify a users role
  • A Moderator can flag a user for review by Admin
  • User object always contains user_roles with id and type properties
  • Only Moderators, admin and super admin can modify a user's permission