You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/03/03 09:18:03 UTC

(tooling-trusted-releases) branch arm updated (2f68b218 -> 02ec7b3e)

This is an automated email from the ASF dual-hosted git repository.

arm pushed a change to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


    from 2f68b218 Add check_access back into routes which require it and remove from GET generally.
     add 2a7d4ea7 Remove unnecessary test endpoint
     add 83b03439 Make one of the compose tests more reliable
     add 3799e8e6 Use two separate functions for the main phases of revision finalisation
     add 7340df57 Add a method to perform quarantine checks when creating a revision
     add 085e2969 Allow wider access to files and check results
     add f4b7ca05 #344 - instructions on how to upload via GitHub Actions
     add b6d5e96c Restore the trailing slash on the documentation route path
     add fcdad6d7 Augment manual vote resolution validation
     new 02ec7b3e #656 - add check_access to remaining handlers

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 atr/admin/__init__.py                           |  34 ---
 atr/detection.py                                |  14 +
 atr/get/distribution.py                         |  12 +-
 atr/get/docs.py                                 |   2 +-
 atr/get/file.py                                 |   2 -
 atr/get/finish.py                               |   1 +
 atr/get/ignores.py                              |   3 +-
 atr/get/report.py                               |   1 -
 atr/get/upload.py                               |  56 +++-
 atr/htm.py                                      |   1 +
 atr/models/sql.py                               |   1 +
 atr/post/distribution.py                        |   2 +
 atr/post/ignores.py                             |   1 +
 atr/post/keys.py                                |   1 +
 atr/post/manual.py                              |  20 +-
 atr/static/css/atr.css                          |  12 +-
 atr/storage/writers/revision.py                 | 368 ++++++++++++++++++++--
 atr/storage/writers/vote.py                     |  23 +-
 migrations/versions/0054_2026.03.02_3799e8e6.py |  38 +++
 tests/e2e/compose/test_get.py                   |   5 +
 tests/unit/test_create_revision.py              |  13 +-
 tests/unit/test_create_revision_quarantine.py   | 385 ++++++++++++++++++++++++
 tests/unit/test_detection.py                    |  38 +++
 23 files changed, 940 insertions(+), 93 deletions(-)
 create mode 100644 migrations/versions/0054_2026.03.02_3799e8e6.py
 create mode 100644 tests/unit/test_create_revision_quarantine.py


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org


(tooling-trusted-releases) 01/01: #656 - add check_access to remaining handlers

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

arm pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit 02ec7b3e79eea8dd55f0dd5e37c535a16ee05405
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Tue Mar 3 09:17:35 2026 +0000

    #656 - add check_access to remaining handlers
---
 atr/get/distribution.py  | 12 ++++++++----
 atr/get/finish.py        |  1 +
 atr/get/ignores.py       |  3 ++-
 atr/post/distribution.py |  2 ++
 atr/post/ignores.py      |  1 +
 atr/post/keys.py         |  1 +
 6 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/atr/get/distribution.py b/atr/get/distribution.py
index fe7eb035..e5955e11 100644
--- a/atr/get/distribution.py
+++ b/atr/get/distribution.py
@@ -37,7 +37,7 @@ from atr.tasks import gha
 
 @get.typed
 async def automate(
-    _session: web.Committer,
+    session: web.Committer,
     _distribution: Literal["distribution/automate"],
     project_name: safe.ProjectName,
     version_name: safe.VersionName,
@@ -45,6 +45,7 @@ async def automate(
     """
     URL: /distribution/automate/<project_name>/<version>
     """
+    await session.check_access(project_name)
     return await _automate_form_page(str(project_name), str(version_name), staging=False)
 
 
@@ -144,7 +145,7 @@ async def list_get(
 
 @get.typed
 async def record(
-    _session: web.Committer,
+    session: web.Committer,
     _distribution: Literal["distribution/record"],
     project_name: safe.ProjectName,
     version_name: safe.VersionName,
@@ -152,12 +153,13 @@ async def record(
     """
     URL: /distribution/record/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     return await _record_form_page(str(project_name), str(version_name), staging=False)
 
 
 @get.typed
 async def stage_automate(
-    _session: web.Committer,
+    session: web.Committer,
     _distribution: Literal["distribution/stage/automate"],
     project_name: safe.ProjectName,
     version_name: safe.VersionName,
@@ -165,12 +167,13 @@ async def stage_automate(
     """
     URL: /distribution/stage/automate/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     return await _automate_form_page(str(project_name), str(version_name), staging=True)
 
 
 @get.typed
 async def stage_record(
-    _session: web.Committer,
+    session: web.Committer,
     _distribution: Literal["distribution/stage/record"],
     project_name: safe.ProjectName,
     version_name: safe.VersionName,
@@ -178,6 +181,7 @@ async def stage_record(
     """
     URL: /distribution/stage/record/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     return await _record_form_page(str(project_name), str(version_name), staging=True)
 
 
diff --git a/atr/get/finish.py b/atr/get/finish.py
index 7a975900..f8b558a6 100644
--- a/atr/get/finish.py
+++ b/atr/get/finish.py
@@ -69,6 +69,7 @@ async def selected(
     URL: /finish/<project_name>/<version_name>
     Finish a release preview.
     """
+    await session.check_access(project_name)
     try:
         (release, source_files_rel, target_dirs, deletable_dirs, rc_analysis, tasks) = await _get_page_data(
             str(project_name), str(version_name)
diff --git a/atr/get/ignores.py b/atr/get/ignores.py
index fec0c60b..bb24979e 100644
--- a/atr/get/ignores.py
+++ b/atr/get/ignores.py
@@ -32,13 +32,14 @@ import atr.web as web
 
 @get.typed
 async def ignores(
-    _session: web.Committer,
+    session: web.Committer,
     _ignores: Literal["ignores"],
     project_name: safe.ProjectName,
 ) -> str | web.WerkzeugResponse:
     """
     URL: /ignores/<project_name>
     """
+    await session.check_access(project_name)
     async with storage.read() as read:
         ragp = read.as_general_public()
         ignores = await ragp.checks.ignores(str(project_name))
diff --git a/atr/post/distribution.py b/atr/post/distribution.py
index e31f77dc..3e4f0b5a 100644
--- a/atr/post/distribution.py
+++ b/atr/post/distribution.py
@@ -119,6 +119,7 @@ async def automate_selected(
     """
     URL: /distribution/automate/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     return await automate_form_process_page(
         session, distribute_form, str(project_name), str(version_name), staging=False
     )
@@ -135,6 +136,7 @@ async def delete(
     """
     URL: /distribution/delete/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     sql_platform = delete_form.platform.to_sql()  # type: ignore[attr-defined]
 
     # Validate the submitted data, and obtain the committee for its name
diff --git a/atr/post/ignores.py b/atr/post/ignores.py
index 853942cb..30c2a2f8 100644
--- a/atr/post/ignores.py
+++ b/atr/post/ignores.py
@@ -37,6 +37,7 @@ async def ignores(
     URL: /ignores/<project_name>
     Handle forms on the ignores page.
     """
+    await session.check_access(project_name)
     match ignore_form:
         case shared.ignores.AddIgnoreForm() as add_form:
             return await _add_ignore(session, add_form, str(project_name))
diff --git a/atr/post/keys.py b/atr/post/keys.py
index bc637bf9..6a3939c4 100644
--- a/atr/post/keys.py
+++ b/atr/post/keys.py
@@ -149,6 +149,7 @@ async def import_selected_revision(
     """
     URL: /keys/import/<project_name>/<version_name>
     """
+    await session.check_access(project_name)
     async with storage.write() as write:
         wacm = await write.as_project_committee_member(str(project_name))
         outcomes: outcome.List[types.Key] = await wacm.keys.import_keys_file(str(project_name), str(version_name))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org