Mentorship-backend: Admin cannot revoke own admin status (not the sole admin)

Created on 21 Jan 2020  路  6Comments  路  Source: anitab-org/mentorship-backend

Describe the bug
According to the test case page on Mentorship backend wiki, a user can revoke her own admin status when she's not the sole admin. However this is not supported by the backend.

To Reproduce

  1. Run mentorship backend locally and assign two users as admin.
  2. Make an admin user call POST /admin/remove to revoke her own admin status.
  3. See error

Expected behavior
Either the backend code should be updated to reflect this feature. Otherwise the wiki should be edited and this item should be removed.

Screenshots

  1. Wiki
    image
  1. More than one admin
    image

  2. Cannot revoke own status
    image

Desktop (please complete the following information):
NA

Smartphone (please complete the following information):
NA

Additional context
NA

Quality Assurance Bug

All 6 comments

Very good catch 馃憦馃憦馃憦 @daksha-aeer
Thank you so much for reporting this bug!

Hey @isabelcosta ! Can @brainguo98 and I work on this while we wait for our other PRs to be reviewed?

@isabelcosta Can I work on this issue?

@lmcicat do you still wish to work on this? Or can I leave it to @chahat99 ?

@isabelcosta I'd love to do it :)

Assigned to you @lmcicat :)

Was this page helpful?
0 / 5 - 0 ratings