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

[Task]: only sync AMO specific policies from cinder #14791

Closed
1 task done
eviljeff opened this issue May 16, 2024 · 3 comments · Fixed by mozilla/addons-server#22255
Closed
1 task done

[Task]: only sync AMO specific policies from cinder #14791

eviljeff opened this issue May 16, 2024 · 3 comments · Fixed by mozilla/addons-server#22255
Assignees
Labels
qa:verified_fix repository:addons-server Issue relating to addons-server
Milestone

Comments

@eviljeff
Copy link
Member

eviljeff commented May 16, 2024

Description

Implements https://mozilla-hub.atlassian.net/browse/AMO2-671

Cinder’s API now returns labels with policies which should enable us to selectively add only “AMO” labelled policies to our database as CinderPolicy instances

{
        "last_updated_by": {
          "id": 43,
          "email": "x@mozilla.com"
        },
        "created_by": {
          "id": 43,
          "email": "x@mozilla.com"
        },
        "status": {
          "id": 2,
          "name": "PUBLISHED"
        },
        "uuid": "97b09ece-f949-4a82-9405-963b024d6ce6",
        "description": "This content violates the law in a jurisdiction where Mozilla content is displayed, which is not permitted under Mozilla's Acceptable Use Policy. (See < >.)\n\n",
        "nested_policies": [],
        "labels": [
          {
            "name": "AMO",
            "description": "AMO"
          }
        ],
        "name": "Illegal content ",
        "created_at": "2024-01-23T16:38:26.539Z",
        "updated_at": "2024-05-02T03:10:19.421Z"
      },

Acceptance Criteria

  ### Acceptance Criteria
  - [ ] executing the policy sync task only syncs policies that are labelled with "AMO"

Checks

  • If the issue is ready to work on, I have removed the "needs:info" label.

┆Issue is synchronized with this Jira Task

@ioanarusiczki
Copy link

I see in Cinder - Policies that the list has policies labeled with "AMO" or "MoSo".

I assume I should see in admin only what's "AMO"

"Approve" and "Copyright and trademark" have both labels , should also be available after sync.

@eviljeff
Copy link
Member Author

@ioanarusiczki yes - policies labelled with AMO or no label. And it should also remove any policies that are labelled with other labels, if they aren't connected to ReviewActionReason or a decision

@ioanarusiczki
Copy link

After sync the number of policies dropped from 139 to 87.

What's with AMO label in Cinder is also present in AMO admin including: Approve, Ignore, Escalate policies + their sub-policies.

There's one sub-policy in admin , id 37 "Online gambling" from "Acceptable Use" which is not present in Cinder.
That's something I've noticed missing in Cinder in the action list for reports and I filed it on Lindie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified_fix repository:addons-server Issue relating to addons-server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants