Class: Group

Inherits:
Principal show all
Defined in:
lib/group.rb

Instance Attribute Summary

Attributes inherited from ACL_Object

#col_path, #doc

Instance Method Summary collapse

Methods inherited from Principal

#add_membership, #eq, #ne

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