This is an automated email from the ASF dual-hosted git repository.
sebbASF 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 1ae87bef Show who last updated the group
1ae87bef is described below
commit 1ae87befbf7a494ea6a8c941a5a409f3da827b99
Author: Sebb <[email protected]>
AuthorDate: Tue Jun 2 16:18:12 2026 +0100
Show who last updated the group
---
lib/whimsy/asf/ldap.rb | 18 +++++++++++++++---
www/roster/public_ldap_authgroups.rb | 1 +
www/roster/public_ldap_groups.rb | 1 +
www/roster/public_ldap_projects.rb | 1 +
www/roster/public_ldap_services.rb | 1 +
5 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index af4fa79b..bc005a77 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1144,10 +1144,11 @@ module ASF
# fetch <tt>dn</tt>, <tt>member</tt>, <tt>modifyTimestamp</tt>, and
# <tt>createTimestamp</tt> for all groups in LDAP.
def self.preload
- Hash[ASF.search_one(base, 'cn=*', %w(dn memberUid modifyTimestamp
createTimestamp)).map do |results|
+ Hash[ASF.search_one(base, 'cn=*', %w(dn memberUid modifyTimestamp
modifiersName createTimestamp)).map do |results|
cn = results['dn'].first[/^cn=(.*?),/, 1]
group = ASF::Group.find(cn)
group.modifyTimestamp = results['modifyTimestamp'].first # it is
returned as an array of 1 entry
+ group.modifiersName = results['modifiersName'].first # it is returned
as an array of 1 entry
group.createTimestamp = results['createTimestamp'].first # it is
returned as an array of 1 entry
members = results['memberUid'] || []
group.members = members
@@ -1158,6 +1159,9 @@ module ASF
# Date this committee was last modified in LDAP.
attr_accessor :modifyTimestamp
+ # Who made the last change
+ attr_accessor :modifiersName
+
# Date this committee was initially created in LDAP.
attr_accessor :createTimestamp
@@ -1259,10 +1263,11 @@ module ASF
# fetch <tt>dn</tt>, <tt>member</tt>, <tt>modifyTimestamp</tt>, and
# <tt>createTimestamp</tt> for all projects in LDAP.
def self.preload
- Hash[ASF.search_one(base, 'cn=*', %w(dn member owner modifyTimestamp
createTimestamp)).map do |results|
+ Hash[ASF.search_one(base, 'cn=*', %w(dn member owner modifyTimestamp
modifiersName createTimestamp)).map do |results|
cn = results['dn'].first[/^cn=(.*?),/, 1]
project = self.find(cn)
project.modifyTimestamp = results['modifyTimestamp'].first # it is
returned as an array of 1 entry
+ project.modifiersName = results['modifiersName'].first # it is
returned as an array of 1 entry
project.createTimestamp = results['createTimestamp'].first # it is
returned as an array of 1 entry
members = results['member'] || []
owners = results['owner'] || []
@@ -1276,6 +1281,9 @@ module ASF
# Date this committee was last modified in LDAP.
attr_accessor :modifyTimestamp
+ # Who made the last change
+ attr_accessor :modifiersName
+
# Date this committee was initially created in LDAP.
attr_accessor :createTimestamp
@@ -1513,10 +1521,11 @@ module ASF
# <tt>createTimestamp</tt> for all services in LDAP.
# N.B. some services have memberUid rather than member entries
def self.preload
- Hash[ASF.search_one(base, 'cn=*', %w(dn member memberUid modifyTimestamp
createTimestamp)).map do |results|
+ Hash[ASF.search_one(base, 'cn=*', %w(dn member memberUid modifyTimestamp
modifiersName createTimestamp)).map do |results|
cn = results['dn'].first[/^cn=(.*?),/, 1]
service = self.find(cn)
service.modifyTimestamp = results['modifyTimestamp'].first # it is
returned as an array of 1 entry
+ service.modifiersName = results['modifiersName'].first # it is
returned as an array of 1 entry
service.createTimestamp = results['createTimestamp'].first # it is
returned as an array of 1 entry
members = results['member'] || results['memberUid'].map {|k|
ASF::Person.dn(k)} || []
service.members = members
@@ -1527,6 +1536,9 @@ module ASF
# Date this committee was last modified in LDAP.
attr_accessor :modifyTimestamp
+ # Who made the last change
+ attr_accessor :modifiersName
+
# Date this committee was initially created in LDAP.
attr_accessor :createTimestamp
diff --git a/www/roster/public_ldap_authgroups.rb
b/www/roster/public_ldap_authgroups.rb
index e606ea22..1b60b836 100644
--- a/www/roster/public_ldap_authgroups.rb
+++ b/www/roster/public_ldap_authgroups.rb
@@ -51,6 +51,7 @@ groups.keys.sort_by(&:name).each do |entry|
entries[entry.name] = {
createTimestamp: entry.createTimestamp,
modifyTimestamp: entry.modifyTimestamp,
+ modifiersName: entry.modifiersName,
roster_count: m.size,
roster: m
}
diff --git a/www/roster/public_ldap_groups.rb b/www/roster/public_ldap_groups.rb
index bdefc7a1..9881d4d0 100644
--- a/www/roster/public_ldap_groups.rb
+++ b/www/roster/public_ldap_groups.rb
@@ -46,6 +46,7 @@ groups.sort_by {|g, _| g.name}.each do |group, _|
entries[group.name] = {
createTimestamp: createTimestamp,
modifyTimestamp: modifyTimestamp,
+ modifiersName: group.modifiersName,
roster_count: m.size,
roster: m
}
diff --git a/www/roster/public_ldap_projects.rb
b/www/roster/public_ldap_projects.rb
index 6f7fbfac..3bd7704b 100644
--- a/www/roster/public_ldap_projects.rb
+++ b/www/roster/public_ldap_projects.rb
@@ -80,6 +80,7 @@ projects.keys.sort_by(&:name).each do |entry|
entries[entry.name] = {
createTimestamp: entry.createTimestamp,
modifyTimestamp: entry.modifyTimestamp,
+ modifiersName: entry.modifiersName,
member_count: m.size,
owner_count: o.size,
members: m,
diff --git a/www/roster/public_ldap_services.rb
b/www/roster/public_ldap_services.rb
index a8945fd8..cf2f09aa 100644
--- a/www/roster/public_ldap_services.rb
+++ b/www/roster/public_ldap_services.rb
@@ -45,6 +45,7 @@ groups.keys.sort_by(&:name).each do |entry|
entries[entry.name] = {
createTimestamp: entry.createTimestamp,
modifyTimestamp: entry.modifyTimestamp,
+ modifiersName: entry.modifiersName,
roster_count: m.size,
roster: m
}