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 33a782b  Doc for ASF LDAP attrs
33a782b is described below

commit 33a782bbc29a5bf4feb0af7f76ce5ecf0586e5ce
Author: Sebb <[email protected]>
AuthorDate: Sun Nov 19 00:37:31 2017 +0000

    Doc for ASF LDAP attrs
---
 lib/whimsy/asf/ldap.rb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 736bd86..5e04e62 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -28,6 +28,9 @@
 #   puts [rubys1.__id__, rubys2.__id__, rubys3.__id__]
 #
 
+# Note: custom ASF LDAP attributes are defined in the file:
+# 
https://github.com/apache/infrastructure-puppet/blob/deployment/modules/ldapserver/files/asf-custom.schema
+
 require 'wunderbar'
 require 'ldap'
 require 'weakref'
@@ -619,6 +622,20 @@ module ASF
       not attrs['loginShell'] or %w(/bin/false bin/nologin bin/no-cla).any? 
{|a| attrs['loginShell'].first.include? a}
     end
 
+    # determine if the person has no login.  If scanning a large list, consider
+    # preloading the <tt>loginShell</tt> attributes for these people.
+    def nologin?
+      # FreeBSD uses /usr/bin/false; Ubuntu uses /bin/false
+      not attrs['loginShell'] or %w(/bin/false bin/nologin bin/no-cla).any? 
{|a| attrs['loginShell'].first.include? a}
+    end
+
+    # determine if the person has asf-banned: yes.  If scanning a large list, 
consider
+    # preloading the <tt>asf-banned</tt> attributes for these people.
+    def asf_banned?
+      # No idea what this means (yet)
+      attrs['asf-banned'] == 'yes'
+    end
+
     # primary mail addresses
     def mail
       attrs['mail'] || []

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to