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

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


The following commit(s) were added to refs/heads/main by this push:
     new 72b29a7  Fix a problem with checking test committee membership
72b29a7 is described below

commit 72b29a7691f5d3fea83b5b83fc8bbd183657e814
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Nov 14 14:20:32 2025 +0000

    Fix a problem with checking test committee membership
---
 atr/storage/writers/release.py | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/atr/storage/writers/release.py b/atr/storage/writers/release.py
index d5e6231..2c04822 100644
--- a/atr/storage/writers/release.py
+++ b/atr/storage/writers/release.py
@@ -33,6 +33,7 @@ import sqlalchemy.engine as engine
 import sqlmodel
 
 import atr.analysis as analysis
+import atr.config as config
 import atr.db as db
 import atr.log as log
 import atr.models.api as api
@@ -344,14 +345,26 @@ class CommitteeParticipant(FoundationCommitter):
         if not project:
             raise storage.AccessError(f"Project {project_name} not found")
 
-        # TODO: Temporarily allow committers to start drafts
-        if project.committee is None or (
-            self.__asf_uid not in project.committee.committee_members
-            and self.__asf_uid not in project.committee.committers
-        ):
-            raise storage.AccessError(
-                f"You must be a member or committer for the 
{project.display_name} committee to start a release draft."
-            )
+        tests_allowed = config.get().ALLOW_TESTS
+        committee = project.committee
+        is_test_committee = tests_allowed and (committee is not None) and 
(committee.name == "test")
+        should_skip_auth = is_test_committee
+
+        if not should_skip_auth:
+            display_name = project.display_name
+            if committee is None:
+                raise storage.AccessError(
+                    f"You must be a member or committer of the {display_name} 
committee to start a release draft."
+                )
+
+            is_committee_member = self.__asf_uid in committee.committee_members
+            is_committee_committer = self.__asf_uid in committee.committers
+            has_committee_access = is_committee_member or 
is_committee_committer
+
+            if not has_committee_access:
+                raise storage.AccessError(
+                    f"You must be a member or committer of the {display_name} 
committee to start a release draft."
+                )
 
         # TODO: Consider using Release.revision instead of ./latest
         # Check whether the release already exists


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to