whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: appease Travis
Date Sat, 03 Aug 2019 16:45:57 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 9b4061f  appease Travis
9b4061f is described below

commit 9b4061f353d0eb1ec27b127b63e0950b307da26c
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sat Aug 3 12:45:39 2019 -0400

    appease Travis
---
 www/board/agenda/routes.rb                  | 4 ++--
 www/board/agenda/views/actions/post.json.rb | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 7e7c71c..901e7db 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -426,10 +426,10 @@ end
 # historical comments, filtered to only include the list of projects which
 # the user is a member of the PMC for non-ASF-members and non-officers.
 get '/json/historical-comments' do
-  user=ASF::Person.find(env.user)
+  user = env.respond_to?(:user) && ASF::Person.find(env.user)
   comments = HistoricalComments.comments
 
-  unless user.asf_member? or ASF.pmc_chairs.include? user
+  unless !user or user.asf_member? or ASF.pmc_chairs.include? user
     comments = comments.select do |project, list|
       ASF::Committee.find(project).owners.include? user
     end
diff --git a/www/board/agenda/views/actions/post.json.rb b/www/board/agenda/views/actions/post.json.rb
index 0ffaf0b..4102816 100644
--- a/www/board/agenda/views/actions/post.json.rb
+++ b/www/board/agenda/views/actions/post.json.rb
@@ -19,7 +19,8 @@ attach = nil
 # Determine if user is authorized
 user = ASF::Person.find(env.user)
 member_or_officer = user.asf_member? or ASF.pmc_chairs.include? user
-credentials = member_or_officer ? nil : [['--username', 'whimsysvn']]
+credentials = member_or_officer and env.password ? 
+  nil : [['--username', 'whimsysvn']]
 
 Agenda.update(@agenda, @message, auth: credentials) do |agenda|
   # quick parse of agenda
@@ -169,7 +170,7 @@ end
 
 # filter agenda if project is specified or the user is not authorized to see
 # the entire document
-if @project or not member_or_officer
+if @project or credentials
   agenda = _.delete 'agenda'
  _item agenda.find {|report| report[:attach] == attach}
 end


Mime
View raw message