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

Implementation Plan: Django admin moderator access control and base improvements #3494

Merged

Conversation

sarayourfriend
Copy link
Collaborator

@sarayourfriend sarayourfriend commented Dec 8, 2023

Fixes

Fixes #1966 by @sarayourfriend

Description

@krysal @stacimc I've chosen y'all to review this plan with me. I'll ping y'all privately about this, but I'd like to schedule time to do a synchronous review, if possible, to avoid the long review process getting even further prolonged by my part-time work schedule.

This discussion is following the Openverse decision-making process. Information about this process can be found on the Openverse documentation site.

Requested reviewers or participants will be following this process. If you are being asked to give input on a specific detail, you do not need to familiarise yourself with the process and follow it.

Current round

This discussion is currently in the Proposal approval round.

The deadline for review of this round is 9 January 2024.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • [N/A] I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • [N/A] I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@sarayourfriend sarayourfriend added 📄 aspect: text Concerns the textual material in the repository 🧱 stack: api Related to the Django API 🧭 project: implementation plan An implementation plan for a project labels Dec 8, 2023
@sarayourfriend sarayourfriend requested a review from a team as a code owner December 8, 2023 02:44
@sarayourfriend sarayourfriend marked this pull request as draft December 8, 2023 02:44
@openverse-bot openverse-bot added 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature labels Dec 8, 2023
@sarayourfriend
Copy link
Collaborator Author

This is ready for early review, but I still need to do basic proofreading of it. However, I've covered all the basic elements of the implementation, so if @krysal or @stacimc, either of y'all take a look at this before it's marked ready for review again, that's totally fine, leave any comments you like 👍.

@stacimc
Copy link
Collaborator

stacimc commented Dec 8, 2023

@sarayourfriend I'll plan on taking a look Monday. Scheduling a synchronous review sounds good as well 👍

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started reading, but my time today is over. I'll finish on Monday. Thanks for drafting this IP!

@sarayourfriend sarayourfriend marked this pull request as ready for review December 11, 2023 02:23
Copy link

Full-stack documentation: https://docs.openverse.org/_preview/3494

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

New files ➕:

Copy link
Collaborator

@stacimc stacimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a few comments, but for the most part all my questions were answered by the time I was done reading :) This is great work, and I appreciate the extensibility without increasing scope at this stage. If it is easier to chat synchronously about any of this I am happy to do so!

@sarayourfriend sarayourfriend marked this pull request as draft December 18, 2023 02:41
@sarayourfriend sarayourfriend force-pushed the implementation-plan/django-admin-access-moderators branch 2 times, most recently from 75c4ac6 to aba1c7b Compare December 18, 2023 03:28
@sarayourfriend sarayourfriend marked this pull request as ready for review December 18, 2023 03:31
@sarayourfriend
Copy link
Collaborator Author

@krysal @stacimc this is ready for review again. I set the deadline to Wednesday to give me time on my Thursday and Friday before I go on Holiday to review any additional comments and (hopefully) create the issues.

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplified proposal makes perfectly sense, and it is quite complete with the security details from CloudWatch and Terraform. Thank you!

From the comments I left, my main question is related to how it would change the report models, specifically on the status.


This is in three separate issues:

1. Create a new media view to replace the existing view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it still valuable to keep the current media detail view. In case someone needs to check something from a specific work having the uuid, it could be easier from the admin UI than accessing the production DB.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This view would retain all the functionality of the existing view. I can reword this to say extend, rather than replace. The view would still be registered as the model admin for the media items and would have all the same features, just with the additional moderation features added at the bottom of the current view and with the media data shown in an uneditable state for moderators.

Copy link
Collaborator

@stacimc stacimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updates look fantastic :) Really pleased with the flexibility of this approach!

need to generate reports for each of the works and action them, just a single
`ModerationDecision` for each work with an appropriate action and consequence.
This avoids need to create "fabricated" reports for bulk moderation actions that
wouldn't have reports in the first place. _This is just a suggested additional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent!

Copy link
Collaborator

@stacimc stacimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see this formally went into the Decision round -- officially LGTM!

@sarayourfriend sarayourfriend force-pushed the implementation-plan/django-admin-access-moderators branch from c8bb1de to 4827f64 Compare January 3, 2024 00:19
@sarayourfriend
Copy link
Collaborator Author

sarayourfriend commented Jan 3, 2024

@stacimc @krysal I've updated the implementation plan with the new backfill for moderation decision and dropping report status. The plan is in the "proposal approval" stage, so please re-review and share any outstanding blockers that prevent the plan from moving forward, or confirm approval so we can move forward and I can create issues for the plan.

I've set the deadline to 9 January to allow time for review. I will be on holiday from 15 Jan until basically the start of February, so I'd really like to be able to finish this plan and create the issues by the end of next week to avoid it pending until February, which would put it at nearly two months in review due to the holidays, AFK, and revisions. I'm not asking for an urgent approval, just for urgent reviews so that any outstanding true blockers can get addressed ASAP.

If there are outstanding blockers, please anticipate scheduling synchronous time to discuss them in order to move the process along more quickly than the asynchronous discussion can manage.

Thanks!

Update: oops! I didn't see your comment, @stacimc, I hadn't refreshed the page in a while 😅 Krystle, please rereview when you can 🙏

@openverse-bot
Copy link
Collaborator

Based on the medium urgency of this PR, the following reviewers are being gently reminded to review this PR:

@dhruvkb
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 13 day(s) ago. PRs labelled with medium urgency are expected to be reviewed within 4 weekday(s)2.

@sarayourfriend, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings.

Footnotes

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

@sarayourfriend sarayourfriend requested review from krysal and removed request for dhruvkb January 5, 2024 00:07
Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect!

@sarayourfriend sarayourfriend merged commit efba05d into main Jan 7, 2024
39 checks passed
@sarayourfriend sarayourfriend deleted the implementation-plan/django-admin-access-moderators branch January 7, 2024 23:26
@sarayourfriend
Copy link
Collaborator Author

I've created the issues. Milestone is here: https://github.com/WordPress/openverse/milestone/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 aspect: text Concerns the textual material in the repository 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon 🧭 project: implementation plan An implementation plan for a project skip-changelog 🧱 stack: api Related to the Django API
Projects
Status: Accepted
Archived in project
Development

Successfully merging this pull request may close these issues.

Implementation Plan: Django admin access control and tool improvements
4 participants