Class: GitHub::Ldap::VirtualGroup
- Includes:
- Filter
- Defined in:
- lib/github/ldap/virtual_group.rb
Constant Summary
Constants included from Filter
Filter::ALL_GROUPS_FILTER, Filter::MEMBERSHIP_NAMES
Constants inherited from Group
Instance Attribute Summary
Attributes inherited from Group
Instance Method Summary collapse
- #is_member(user_dn) ⇒ Object
- #members ⇒ Object
-
#membership_attribute ⇒ Object
Internal - Get the attribute to use for membership filtering.
- #subgroups ⇒ Object
Methods included from Filter
#all_members_by_uid, #group_contains_filter, #group_filter, #login_filter, #member_filter, #members_of_group, #posix_member_filter, #subgroups_of_group
Methods inherited from Group
#group?, group?, #group_and_member_entries, #groups_and_members, #initialize, #is_member?, #load_cache, #loop_cached_groups, #member_entries, #member_names
Constructor Details
This class inherits a constructor from GitHub::Ldap::Group
Instance Method Details
#is_member(user_dn) ⇒ Object
14 15 16 |
# File 'lib/github/ldap/virtual_group.rb', line 14 def is_member(user_dn) @ldap.search(filter: is_member_of_group(user_dn, @entry.dn, membership_attribute)) end |
#members ⇒ Object
6 7 8 |
# File 'lib/github/ldap/virtual_group.rb', line 6 def members @ldap.search(filter: members_of_group(@entry.dn, membership_attribute)) end |
#membership_attribute ⇒ Object
Internal - Get the attribute to use for membership filtering.
Returns a string.
21 22 23 |
# File 'lib/github/ldap/virtual_group.rb', line 21 def membership_attribute @ldap.virtual_attributes.virtual_membership end |
#subgroups ⇒ Object
10 11 12 |
# File 'lib/github/ldap/virtual_group.rb', line 10 def subgroups @ldap.search(filter: subgroups_of_group(@entry.dn, membership_attribute)) end |