role_authorization 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -98,13 +98,11 @@ module RoleAuthorization
|
|
98
98
|
end
|
99
99
|
|
100
100
|
if hash
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
klass
|
105
|
-
end
|
101
|
+
klass = (hash[:controller].camelize + "Controller").constantize.new
|
102
|
+
klass.params = hash
|
103
|
+
klass.instance_variable_set(:@current_user, current_user)
|
106
104
|
|
107
|
-
return authorized_action?(
|
105
|
+
return authorized_action?(klass, hash[:controller], hash[:action].to_sym, hash[:id])
|
108
106
|
end
|
109
107
|
rescue Exception => e
|
110
108
|
Rails.logger.error e.inspect
|