Project

General

Profile

« Previous | Next » 

Revision f706cc1d

Added by Marc Dequènes over 14 years ago

  • ID f706cc1dcc9263550db2ca8219d705c9015ee535

[evol] fix and improve before hooks for aspects

View differences:

lib/ldap_shadows/controller.rb
aspect_def.recursive_symbolize_keys!
@aspects[aspect_name] = aspect_def
filename = File.join(Config::CFG_DIR, "hooks", "aspects", aspect_name.to_s.downcase + ".rb")
return if @shadow_config_path.nil?
filename = File.join(@shadow_config_path, "hooks", "aspects", aspect_name.to_s.downcase + ".rb")
if File.exists?(filename)
klass_name = "LdapAspect" + aspect_name.to_s.capitalize
klass_content = IO.read(filename)
......
end
class Aspect
def hook_create
def self.hook_before_create
end
def hook_modify
def self.hook_before_modify
end
protected
def self.raise_error(msg)
raise ProcessingError, msg
end
end

Also available in: Unified diff