lib/orange/middleware/access_control.rb in orange-0.0.12 vs lib/orange/middleware/access_control.rb in orange-0.0.13

- old
+ new

@@ -74,11 +74,11 @@ packet.session['user.id'] = nil packet['user.id'] = nil after = packet.session['user.after_login'].blank? ? '/' : packet.session['user.after_login'] packet.reroute(after) - false + return false end packet.reroute('/') if packet['user.id'] # Reroute to index if we're logged in. # If login set if packet.request.post? @@ -133,15 +133,15 @@ :identifier => packet.request.params["openid_identifier"], :required => [:email, "http://axschema.org/contact/email"] ) ) packet[:content] = 'Got openID?' - packet.finish + return packet.finish end # Show login form, if necessary else packet[:content] = orange[:parser].haml('openid_login.haml', packet) - packet.finish + return packet.finish end end # end handle_openid end end \ No newline at end of file