whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 018f954: Fetch the modifyTimestamp as well
Date Sat, 23 Jan 2016 17:32:13 GMT
Commit 018f9546575846bdc0442acf40092e48d318a1bd:
    Fetch the modifyTimestamp as well


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
lib/whimsy/asf/ldap.rb                                       | ++++++++++ -
------------------------------------------------------------
11 changes: 10 additions, 1 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index b1ff20b..12445c8 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -352,15 +352,24 @@ def include?(person)
     end
 
     def self.preload
-      Hash[ASF.search_one(base, "cn=*", %w(dn memberUid)).map do |results|
+      Hash[ASF.search_one(base, "cn=*", %w(dn memberUid modifyTimestamp)).map do |results|
         cn = results['dn'].first[/^cn=(.*?),/, 1]
         group = ASF::Group.find(cn)
+        group.modifyTimestamp = results['modifyTimestamp']
         members = results['memberUid']
         group.members = members || []
         [group, members]
       end]
     end
 
+    def modifyTimestamp=(ts)
+      @modifyTimestamp = ts
+    end
+
+    def modifyTimestamp
+      @modifyTimestamp
+    end
+
     def members=(members)
       @members = WeakRef.new(members)
     end

Mime
View raw message