scottmotte-merb_auth_slice_multisite 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,3 +1,4 @@
1
+ ---
1
2
  :major: 0
2
3
  :minor: 8
3
- :patch: 0
4
+ :patch: 1
@@ -56,20 +56,9 @@ class Merb::Authentication
56
56
  class Form < Base
57
57
 
58
58
  def run!
59
-
60
59
  if (login = request.params[login_param]) && (password = request.params[password_param]) && (site_id = request.params[site_id_param])
61
- # see if user exists for the site_id
62
- user = user_class.first(login_param => login, site_id_param => site_id)
63
- if user
64
- # user_class.get(:login)
65
- user = user_class.authenticate(login, password)
66
- if !user
67
- errors = request.session.authentication.errors
68
- errors.clear!
69
- errors.add(login_param, strategy_error_message)
70
- end
71
- user
72
- else
60
+ user = user_class.all(site_id_param => site_id).authenticate(login, password)
61
+ if !user
73
62
  errors = request.session.authentication.errors
74
63
  errors.clear!
75
64
  errors.add(login_param, strategy_error_message)
@@ -63,27 +63,6 @@ if defined?(Merb::Plugins)
63
63
  user
64
64
  end # Merb::Authentication.after_authentication
65
65
  end
66
-
67
-
68
-
69
-
70
- # from 0.3.2 version of merb_auth_slice_multisite
71
- # # Actually check if the user belongs to the site
72
- # ::Merb::Authentication.after_authentication do |user, request, params|
73
- # # clean this up somehow
74
- # if request.first_subdomain != nil
75
- # current_site = Site.first(:subdomain => request.first_subdomain)
76
- # if user.site_id != current_site.id
77
- # errors = request.session.authentication.errors
78
- # errors.clear!
79
- # errors.add("Label", "User does not belong to this site.")
80
- # nil
81
- # else
82
- # user
83
- # end
84
- # end
85
- # end
86
-
87
66
  end
88
67
 
89
68
  # Activation hook - runs after AfterAppLoads BootLoader
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scottmotte-merb_auth_slice_multisite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - scottmotte
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-03 00:00:00 -07:00
12
+ date: 2009-05-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15