whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Embolden ASF members in groups
Date Sat, 07 Dec 2019 15:59:20 GMT
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 c05dab4  Embolden ASF members in groups
     new 715048d  Merge branch 'master' of https://gitbox.apache.org/repos/asf/whimsy
c05dab4 is described below

commit c05dab43b187abc13318716052ccc57c588de3a6
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Dec 7 15:58:39 2019 +0000

    Embolden ASF members in groups
---
 www/roster/models/group.rb   | 6 ++++--
 www/roster/views/group.js.rb | 9 +++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/www/roster/models/group.rb b/www/roster/models/group.rb
index 212cbf2..603c557 100644
--- a/www/roster/models/group.rb
+++ b/www/roster/models/group.rb
@@ -58,7 +58,8 @@ class Group
         id: id,
         type: type,
         dn: (group.dn rescue ''), # not all groups have a DN
-        members: Hash[group.members.map {|person| [person.id, (person.cn rescue '**Entry
missing from LDAP people**')]}] # if id not in people
+        members: Hash[group.members.map {|person| [person.id, (person.cn rescue '**Entry
missing from LDAP people**')]}], # if id not in people
+        asfmembers: group.members.select{|person| ASF.members.include?(person)}.map(&:id),
       }
 
       if id == 'hudson-jobadmin'
@@ -86,7 +87,8 @@ class Group
           id: id,
           type: type,
           dn: (group.dn rescue ''), # not all groups have a DN
-          members: Hash[group.map {|person| [person.id, person.cn]}]
+          members: Hash[group.map {|person| [person.id, person.cn]}],
+          asfmembers: group.select{|person| ASF.members.include?(person)}.map(&:id),
         }
       end
     end
diff --git a/www/roster/views/group.js.rb b/www/roster/views/group.js.rb
index cbaccd7..76cb850 100644
--- a/www/roster/views/group.js.rb
+++ b/www/roster/views/group.js.rb
@@ -11,6 +11,7 @@ class Group < Vue
   def render
     group = @group
     members = group.members.keys().sort_by {|id| group.members[id]}
+    asfmembers = group.asfmembers || []
 
     if group.type == 'LDAP auth group' or group.id == 'asf-secretary'
       auth = (members.include? @@auth.id or @@auth.secretary or @@auth.root)
@@ -47,7 +48,7 @@ class Group < Vue
 
       _tbody do
         members.each do |id|
-          _GroupMember id: id, name: group.members[id], auth: auth, 
+          _GroupMember id: id, name: group.members[id], auth: auth, asfmember: asfmembers.includes(id),
             pending: false
         end
 
@@ -114,7 +115,11 @@ class GroupMember < Vue
   def render
     _tr onDblclick: self.select do
       _td {_a @@id, href: "committer/#{@@id}"}
-      _td @@name
+      if @@asfmember
+        _td { _b @@name }
+      else
+        _td @@name
+      end
 
       _td data_id: @@id do
         if @@pending


Mime
View raw message