constellation-authorization 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,14 @@
|
|
1
1
|
require 'constellation/authorization'
|
2
2
|
require 'rails'
|
3
|
+
require 'action_controller'
|
4
|
+
require 'action_view'
|
3
5
|
|
4
6
|
module Constellation
|
5
7
|
module Authorization
|
6
8
|
class Engine < Rails::Engine
|
7
9
|
config.constellation = ActiveSupport::OrderedOptions.new unless config.respond_to? :constellation
|
8
10
|
config.constellation.authorization = ActiveSupport::OrderedOptions.new
|
11
|
+
config.constellation.authorization.root = __FILE__.gsub('/lib/constellation/authorization/engine.rb', '')
|
9
12
|
config.constellation.authorization.implementation = :default
|
10
13
|
config.constellation.authorization.login_required_redirection = { :controller => 'user_sessions', :action => 'new' }
|
11
14
|
config.constellation.authorization.permission_denied_redirection = ''
|
@@ -18,6 +21,7 @@ module Constellation
|
|
18
21
|
ActionController::Base.send :include, Constellation::Authorization::Base
|
19
22
|
ActionView::Base.send :include, Constellation::Authorization::Base::ControllerInstanceMethods
|
20
23
|
if app.config.constellation.authorization.implementation == :default
|
24
|
+
require 'active_record'
|
21
25
|
ActiveRecord::Base.send :include,
|
22
26
|
Constellation::Authorization::Default::UserExtensions,
|
23
27
|
Constellation::Authorization::Default::ModelExtensions
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 2.0.
|
8
|
+
- 3
|
9
|
+
version: 2.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Bill Katz
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04
|
19
|
+
date: 2010-05-04 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|