Revision 488f778c
Added by Marc Dequènes about 15 years ago
- ID 488f778c915137eafca9fefe4c99137ea17d7d11
conf/ldap_shadows/shadows/MilkyPond/hooks/aspects/fs.rb | ||
---|---|---|
STEP_UID = 100
|
||
DEFAULT_GROUP = 'dc-users'
|
||
|
||
def self.hook_mod(mapper, item)
|
||
def self.hook_modify(mapper, item)
|
||
unless item.attribute_present?('gidNumber')
|
||
item.primaryGroup = mapper.find_klass(:group).find(:first, DEFAULT_GROUP)
|
||
end
|
lib/ldap_shadows/controller.rb | ||
---|---|---|
def hook_create
|
||
end
|
||
|
||
def hook_mod
|
||
def hook_modify
|
||
end
|
||
end
|
||
|
lib/ldap_shadows/object.rb | ||
---|---|---|
if self.new_entry?
|
||
aklass.hook_create(self.class.mapper, self)
|
||
else
|
||
aklass.hook_mod(self.class.mapper, self)
|
||
aklass.hook_modify(self.class.mapper, self)
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[cleanup] hook_mod -> hook_modify