Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBS-13770: Allow admins to auto-approve and auto-reject any edit #3392

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Oct 28, 2024

  1. MBS-13770: Add new Admin approval/rejection votes

    This adds two special vote types ("Admin approval" and "Admin rejection")
    that will be used in a subsequent commit for a feature that allows admins
    to immediately accept or reject any edit. These are added first in
    a separate commit so that it can be released on production while
    the main part of the new feature is released on beta,
    avoiding any temporary production ISEs when encountering the new vote types.
    
    "Admin approval" is treated as an approval for icons and headers, while
    "Admin rejection" is treated as a No vote. The new vote types are searchable
    in edit searches, their stats can be seen on admin profiles, etc.
    reosarevok committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    1f4bb4b View commit details
    Browse the repository at this point in the history
  2. MBS-13770: Allow admins to auto-approve and auto-reject any edit

    There's plenty of cases where a removal of a spam release for example
    sits open for days, and closing it earlier requires asking for more eyes on it
    which does seem like the opposite of what you want to do with spam.
    
    This allows account admins to use the same accept/reject mechanism
    we already used in test servers to immediately accept or reject
    any open edit (including their own). When doing so, a vote is added to the
    edit (of the newly added types "Admin approval" or "Admin reject",
    added in a previous commit so they can be visible in production),
    so it is as clear as possible why the edit applied or failed.
    
    I kept the mechanisms separate, still keeping a /test/ endpoint for
    the existing testing mechanism while adding a new /admin/ one for the
    new feature. This is mostly for testing purposes (it's very hard to test
    for the feature otherwise since the test setup has the buttons on by
    default because of its DB_STAGING_TESTING_FEATURES setting) but also
    to avoid setting the new votes every time we use the feature in testing,
    since that might not be desirable.
    reosarevok committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    11b6eef View commit details
    Browse the repository at this point in the history
  3. Clean broken enter_votes code

    We seemingly were never hitting this, because as soon as we did
    during my testing, it died horribly.
    Unsurprisingly, since it was trying to access $_ outside the any call.
    Unsure how useful this is given we never hit it, but for now, this at least
    actually should do what the old code tried to.
    reosarevok committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    23962a0 View commit details
    Browse the repository at this point in the history