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

drop signing api from api/v5+ #20568

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/topics/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ using the API.
reviewers
scanners
shelves
signing
tags
1 change: 1 addition & 0 deletions docs/topics/api/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ These are `v5` specific changes - `v4` changes apply also.
* 2023-03-09: added ``is_disabled`` to version detail and update endpoints, for authenticated developers and revieweers. https://github.com/mozilla/addons-server/issues/20142
* 2023-03-08: restricted ``lang`` parameter to only alphanumeric, ``_``, ``-``. https://github.com/mozilla/addons-server/issues/20452
* 2023-03-09: added ``host_permissions`` to the response of the version detail endpoint. https://github.com/mozilla/addons-server/issues/20418
* 2023-04-13: removed signing api from api/v5+ in favor of addon submission api. https://github.com/mozilla/addons-server/issues/20560

.. _`#11380`: https://github.com/mozilla/addons-server/issues/11380/
.. _`#11379`: https://github.com/mozilla/addons-server/issues/11379/
Expand Down
252 changes: 0 additions & 252 deletions docs/topics/api/signing.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/topics/api/v4_frozen/accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Account
.. _v4-account:

This endpoint returns information about a user's account, by the account id.
Only :ref:`developer <developer_account>` accounts are publicly viewable - other user's accounts will return a 404 not found response code.
Only :ref:`developer <v4-developer_account>` accounts are publicly viewable - other user's accounts will return a 404 not found response code.
Most of the information is optional and provided by the user so may be missing or inaccurate.

.. _`developer_account`:
.. _`v4-developer_account`:

A developer is defined as a user who is listed as a developer or owner of one or more approved add-ons.

Expand Down Expand Up @@ -227,7 +227,7 @@ Any number of notifications can be changed; only non-mandatory notifications can

.. _v4-notification-update-request:

:<json boolean <name>: Is the notification enabled?
:<json boolean name: Is the notification enabled?


------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/api/v4_frozen/addons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ This endpoint allows you to fetch a specific add-on by id, slug or guid.
:>json string edit_url: The URL to the developer edit page for the add-on.
:>json string guid: The add-on `extension identifier <https://developer.mozilla.org/en-US/Add-ons/Install_Manifests#id>`_.
:>json boolean has_eula: The add-on has an End-User License Agreement that the user needs to agree with before installing (See :ref:`add-on EULA and privacy policy <v4-addon-eula-policy>`).
:>json boolean has_privacy_policy: The add-on has a Privacy Policy (See :ref:`v4-add-on EULA and privacy policy <addon-eula-policy>`).
:>json boolean has_privacy_policy: The add-on has a Privacy Policy (See :ref:`add-on EULA and privacy policy <v4-addon-eula-policy>`).
:>json string|object|null homepage: The add-on homepage (See :ref:`translated fields <v4-api-overview-translations>` and :ref:`Outgoing Links <v4-api-overview-outgoing>`).
:>json string icon_url: The URL to icon for the add-on (including a cachebusting query string).
:>json object icons: An object holding the URLs to an add-ons icon including a cachebusting query string as values and their size as properties. Currently exposes 32, 64, 128 pixels wide icons.
Expand Down Expand Up @@ -449,7 +449,7 @@ on AMO.
:>json string results[].guid: The add-on `extension identifier <https://developer.mozilla.org/en-US/Add-ons/Install_Manifests#id>`_.
:>json string results[].slug: The add-on slug.
:>json string results[].target_locale: For dictionaries and language packs, the locale the add-on is meant for. Only present when using the Language Tools endpoint.
:>json string results[].type: The :ref:`v4-add-on type <addon-detail-type>`.
:>json string results[].type: The :ref:`add-on type <v4-addon-detail-type>`.
:>json string results[].url: The (absolute) add-on detail URL.


Expand Down
2 changes: 1 addition & 1 deletion docs/topics/api/v4_frozen/applications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Applications Versions
.. _v4-applications-version:

This internal endpoint allows you to create applications versions to be
referenced in add-ons manifests. It requires :ref:`v4-authentication<api-auth>`
referenced in add-ons manifests. It requires :doc:`authentication<auth>`
and a special permission.

The currently available applications versions are :ref:`available to list<applications-version-list>`.
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/api/v4_frozen/signing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Uploading without an ID

**Response:**

The response body will be the same as the :ref:`version-status` response.
The response body will be the same as the :ref:`v4-version-status` response.

:statuscode 201: new add-on and version created.
:statuscode 202: new version created.
Expand Down Expand Up @@ -188,7 +188,7 @@ set and you can check the results with the ``passed_review`` property.
If true, the version will be signed automatically. If false it will end
up in the manual review queue when valid.
:>json files[].download_url:
URL to :ref:`download the add-on file <download-signed-file>`.
URL to :ref:`download the add-on file <v4-download-signed-file>`.
:>json files[].hash:
Hash of the file contents, prefixed by the hashing algorithm used.
Example: ``sha256:1bb945266bf3701...`` . In the case of signed files,
Expand Down Expand Up @@ -216,7 +216,7 @@ set and you can check the results with the ``passed_review`` property.
Downloading signed files
------------------------

When checking on your :ref:`request to sign a version <version-status>`,
When checking on your :ref:`request to sign a version <v4-version-status>`,
a successful response will give you an API URL to download the signed files.
This endpoint returns the actual file data for download.

Expand Down
1 change: 0 additions & 1 deletion src/olympia/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
re_path(r'^hero/', include('olympia.hero.urls')),
re_path(r'^ratings/', include(ratings_v4.urls)),
re_path(r'^reviewers/', include('olympia.reviewers.api_urls')),
re_path(r'^', include('olympia.signing.urls')),
re_path(r'^', include(amo_api_patterns)),
re_path(r'^scanner/', include('olympia.scanners.api_urls')),
re_path(r'^shelves/', include('olympia.shelves.urls')),
Expand Down
5 changes: 2 additions & 3 deletions src/olympia/devhub/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
validate_version_number_is_gt_latest_signed_listed_version,
verify_mozilla_trademark,
)
from olympia.addons.views import AddonViewSet
from olympia.amo.fields import HttpHttpsOnlyURLField, ReCaptchaField
from olympia.amo.forms import AMOModelForm
from olympia.amo.messages import DoubleSafe
Expand Down Expand Up @@ -966,9 +967,7 @@ def check_throttles(self, request):

Raises ValidationError if the request is throttled.
"""
from olympia.signing.views import VersionView # circular import

view = VersionView()
view = AddonViewSet()
try:
view.check_throttles(request)
except Throttled:
Expand Down
4 changes: 2 additions & 2 deletions src/olympia/devhub/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from olympia import amo, core
from olympia.addons.models import Addon
from olympia.addons.views import AddonViewSet
from olympia.amo.tests import (
addon_factory,
get_random_ip,
Expand All @@ -28,7 +29,6 @@
from olympia.applications.models import AppVersion
from olympia.devhub import forms
from olympia.files.models import FileUpload
from olympia.signing.views import VersionView
from olympia.tags.models import AddonTag, Tag
from olympia.versions.models import ApplicationsVersions

Expand Down Expand Up @@ -221,7 +221,7 @@ def test_throttling(self, parse_addon_mock):
with freeze_time('2019-04-08 15:16:23.42') as frozen_time:
for x in range(0, 6):
self._add_fake_throttling_action(
view_class=VersionView,
view_class=AddonViewSet,
url='/',
user=request.user,
remote_addr=get_random_ip(),
Expand Down
Empty file.
Loading