You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/24 20:27:53 UTC

[whimsy] branch master updated: actually commit the summary file this time; tweak who gets to see the summary button

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 8793e97  actually commit the summary file this time; tweak who gets to see the summary button
8793e97 is described below

commit 8793e97778d609a173a710c74e309f6839fda8c1
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu May 24 16:27:18 2018 -0400

    actually commit the summary file this time; tweak who gets to see the
    summary button
---
 www/board/agenda/views/actions/summary.json.rb | 8 ++++++++
 www/board/agenda/views/models/agenda.js.rb     | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/summary.json.rb b/www/board/agenda/views/actions/summary.json.rb
new file mode 100644
index 0000000..035c7e3
--- /dev/null
+++ b/www/board/agenda/views/actions/summary.json.rb
@@ -0,0 +1,8 @@
+# send summary email to committers
+header, body = @text.untaint.split(/\r?\n\r?\n/, 2)
+header.gsub! /\r?\n/, "\r\n"
+
+mail = Mail.new("#{header}\r\n\r\n#{body}")
+mail.deliver!
+
+{delivered: true, mail: mail.to_s}
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index 126e4a6..1642ed1 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -258,7 +258,7 @@ class Agenda
 
     if not Minutes.complete
       list << {form: Post, text: 'add item'}
-    else
+    elsif [:director, :secretary].include? User.role
       list << {form: Summary}
     end
 

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.