lib/git_wit/auth.rb in git_wit-0.0.3 vs lib/git_wit/auth.rb in git_wit-0.0.4.pre
- old
+ new
@@ -8,11 +8,11 @@
def self.authenticate(user, password)
if config.authenticate.respond_to?(:call)
return config.authenticate.call(user, password)
end
- false
+ config.authenticate
end
def self.authorize_write(user, repository)
authorize :write, user, repository
end
@@ -21,8 +21,8 @@
authorize :read, user, repository
end
def self.authorize(operation, user, repository)
cfg = config.send "authorize_#{operation}".to_sym
- cfg.respond_to?(:call) ? cfg.call(user, repository) : false
+ cfg.respond_to?(:call) ? cfg.call(user, repository) : cfg
end
end
\ No newline at end of file