scottmotte-merb_auth_slice_multisite 0.3.0 → 0.3.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.
@@ -41,12 +41,8 @@ _Don't forget to migrate your database schema with rake db:autoupgrade or rake d
41
41
  before :get_site
42
42
  def get_site
43
43
  # uses @current_site to create pages under appropriate site like @current_site.pages.new
44
- # if there is a subdomain then fetch from subdomain, otherwise fetch from domain
45
- if request.first_subdomain != nil
46
- @current_site = Site.first(:subdomain => request.first_subdomain)
47
- else
48
- @current_site = Site.first(:domain => request.domain)
49
- end
44
+ @current_site = Site.first(:subdomain => request.first_subdomain)
45
+ raise NotFound unless @current_site
50
46
  end
51
47
  </pre></code>
52
48
 
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 0
4
+ :patch: 1
@@ -50,16 +50,6 @@ if defined?(Merb::Plugins)
50
50
  else
51
51
  user
52
52
  end
53
- else
54
- current_site = Site.first(:domain => request.domain)
55
- if user.site_id != current_site.id
56
- errors = request.session.authentication.errors
57
- errors.clear!
58
- errors.add("Label", "User does not belong to this site.")
59
- nil
60
- else
61
- user
62
- end
63
53
  end
64
54
  end
65
55
 
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - scottmotte