codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 68 forks source link

Inconsistent display for a user with the Edit ability suspended #1362

Open trichoplax opened 3 months ago

trichoplax commented 3 months ago

Describe the bug A user with the Edit ability, who has had that ability suspended, shows inconsistent indicators.

To Reproduce Steps to reproduce the behavior:

  1. As a moderator, suspend a user's Edit ability.
  2. As that user, view a post that is not your own and see a "Suggest edit" button (as expected).
  3. As a third user, view the other user's profile page and see "Edit Posts" listed in the right hand panel under "Earned Abilities".
  4. As the third user, click on "Abilities" and see a table showing "no" in the "Earned" column for "Edit Posts".

Expected behavior As the user profile page and the Abilities page are both visible to a third user, they should show consistent information.

Screenshots Screenshot 2024-07-05 at 14-23-07 DEV QPixel - Test post by a moderator for testing Screenshot 2024-07-05 at 14-22-18 DEV QPixel - User user Screenshot 2024-07-05 at 14-21-49 DEV QPixel

cellio commented 3 months ago

This is a more general issue, not specific to suggested edits: suspended abilities are still listed as earned, and you have to click through to see otherwise. We should exclude suspended abilities from the list shown on the profile. (Technically they were earned, but they aren't currently active.)

trichoplax commented 3 months ago

Should this be displayed the same way for the user affected by the ability suspension and other users? Alternatively the affected user could have an indication of the time remaining in their ability suspension (without showing this to other users).