Class: Group
- Inherits:
-
Principal
- Object
- ACL_Object
- Principal
- Group
- Defined in:
- lib/group.rb
Instance Attribute Summary
Attributes inherited from ACL_Object
Instance Method Summary collapse
- #create_new(name, groups, members) ⇒ Object
- #delete(name) ⇒ Object
-
#initialize(connector, col_path, report = false) ⇒ Group
constructor
A new instance of Group.
Methods inherited from Principal
Methods inherited from ACL_Object
#add_membership, #del_membership, #find_parents, #ge, #rename
Constructor Details
#initialize(connector, col_path, report = false) ⇒ Group
Returns a new instance of Group.
3 4 5 |
# File 'lib/group.rb', line 3 def initialize(connector, col_path, report = false) super(connector, col_path, report) end |
Instance Method Details
#create_new(name, groups, members) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/group.rb', line 11 def create_new(name, groups, members) super(name, groups) if(members.length > 0) #add members into group for member in members add_membership(member, [name]) end end rescue => e raise e end |
#delete(name) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/group.rb', line 22 def delete(name) super(name) expr = "#{@doc}//node()[@idref=\"#{name}\"]" @connector.update_delete(expr) return name rescue => e raise e end |