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: Allow for empty LDAP group
Date Sat, 08 Dec 2018 11:27:58 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 498df7d  Allow for empty LDAP group
498df7d is described below

commit 498df7dc613f2e106536052336dd37d7c4eecc5e
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Dec 8 11:27:40 2018 +0000

    Allow for empty LDAP group
    
    e.g. podlings currently
---
 www/roster/models/group.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/roster/models/group.rb b/www/roster/models/group.rb
index 4b235da..e0da5f8 100644
--- a/www/roster/models/group.rb
+++ b/www/roster/models/group.rb
@@ -34,22 +34,22 @@ class Group
     type = 'LDAP group'
     group = ASF::Group.find(id)
 
-    if group.members.empty?
+    unless group.hasLDAP?
       type = 'LDAP auth group'
       group = ASF::AuthGroup.find(id)
     end
 
-    if group.members.empty?
+    unless group.hasLDAP?
       type = 'LDAP service'
       group = ASF::Service.find(id)
     end
 
-    if group.members.empty?
+    unless group.hasLDAP?
       type = 'LDAP app group'
       group = ASF::AppGroup.find(id)
     end
 
-    if not group.members.empty?
+    if group.hasLDAP?
       # LDAP group
 
       people = ASF::Person.preload('cn', group.members)


Mime
View raw message