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.
- data/README.textile +2 -6
- data/VERSION.yml +1 -1
- data/lib/merb_auth_slice_multisite.rb +0 -10
- metadata +1 -1
data/README.textile
CHANGED
@@ -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
|
-
|
45
|
-
|
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
|
|
data/VERSION.yml
CHANGED
@@ -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
|
|