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

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 1259af56 listnames needs environment here
1259af56 is described below

commit 1259af5673f9db011f24dbf1a3b58268bf582101
Author: Sebb <[email protected]>
AuthorDate: Tue Sep 10 22:40:41 2024 +0100

    listnames needs environment here
---
 lib/whimsy/asf/documents.rb                                      | 4 ++--
 www/secretary/workbench/views/actions/withdrawal-request.json.rb | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/documents.rb b/lib/whimsy/asf/documents.rb
index eab271b7..9b62e631 100644
--- a/lib/whimsy/asf/documents.rb
+++ b/lib/whimsy/asf/documents.rb
@@ -273,9 +273,9 @@ module ASF
     # Find the file name (or directory) that matches a person
     # return [svnpath, name] if found
     # return nil if not found
-    def self.findpath(userid)
+    def self.findpath(userid, env)
       reqdir = ASF::SVN.svnpath!(STEM)
-      list, err = ASF::SVN.listnames(reqdir)
+      list, err = ASF::SVN.listnames(reqdir, env.user, env.password)
       if list
         names = list.select{|x| x.start_with?("#{userid}.") or x == 
"#{userid}/"} # if there is a sig, then files are in a subdir
         if names.size == 1
diff --git a/www/secretary/workbench/views/actions/withdrawal-request.json.rb 
b/www/secretary/workbench/views/actions/withdrawal-request.json.rb
index 224ca5dc..f83e6ded 100644
--- a/www/secretary/workbench/views/actions/withdrawal-request.json.rb
+++ b/www/secretary/workbench/views/actions/withdrawal-request.json.rb
@@ -14,7 +14,7 @@ fileext = File.extname(@selected).downcase if 
@signature.empty?
 withdrawal_request = "#{@filename}#{fileext}"
 if @filename =~ /\A[a-z][-a-z0-9]+\z/ # check name is valid as availid
   withdrawal_pending = ASF::SVN.svnpath!('withdrawn-pending')
-  list, err = ASF::SVN.listnames(withdrawal_pending)
+  list, err = ASF::SVN.listnames(withdrawal_pending, env.user, env.password)
   unless list
     _warn err
     list = []

Reply via email to