spree_auth 0.30.0 → 0.30.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree_auth might be problematic. Click here for more details.

@@ -7,7 +7,13 @@ module ResourceController
7
7
  # Calls the before block for the action, if one is present.
8
8
  #
9
9
  def before(action)
10
- authorize! action, object || model
10
+ resource = case action
11
+ when :index, :new, :create
12
+ model
13
+ else object
14
+ end
15
+
16
+ authorize! action, resource
11
17
  invoke_callbacks *self.class.send(action).before
12
18
  end
13
19
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_auth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 103
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 30
9
- - 0
10
- version: 0.30.0
8
+ - 1
9
+ version: 0.30.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Sean Schofield
@@ -15,34 +14,30 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-11-09 00:00:00 -05:00
17
+ date: 2010-11-17 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: spree_core
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - "="
28
26
  - !ruby/object:Gem::Version
29
- hash: 103
30
27
  segments:
31
28
  - 0
32
29
  - 30
33
- - 0
34
- version: 0.30.0
30
+ - 1
31
+ version: 0.30.1
35
32
  type: :runtime
36
33
  version_requirements: *id001
37
34
  - !ruby/object:Gem::Dependency
38
35
  name: authlogic
39
36
  prerelease: false
40
37
  requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
38
  requirements:
43
39
  - - "="
44
40
  - !ruby/object:Gem::Version
45
- hash: 7
46
41
  segments:
47
42
  - 2
48
43
  - 1
@@ -54,11 +49,9 @@ dependencies:
54
49
  name: cancan
55
50
  prerelease: false
56
51
  requirement: &id003 !ruby/object:Gem::Requirement
57
- none: false
58
52
  requirements:
59
53
  - - ">="
60
54
  - !ruby/object:Gem::Version
61
- hash: 29
62
55
  segments:
63
56
  - 1
64
57
  - 3
@@ -122,29 +115,25 @@ rdoc_options: []
122
115
  require_paths:
123
116
  - lib
124
117
  required_ruby_version: !ruby/object:Gem::Requirement
125
- none: false
126
118
  requirements:
127
119
  - - ">="
128
120
  - !ruby/object:Gem::Version
129
- hash: 57
130
121
  segments:
131
122
  - 1
132
123
  - 8
133
124
  - 7
134
125
  version: 1.8.7
135
126
  required_rubygems_version: !ruby/object:Gem::Requirement
136
- none: false
137
127
  requirements:
138
128
  - - ">="
139
129
  - !ruby/object:Gem::Version
140
- hash: 3
141
130
  segments:
142
131
  - 0
143
132
  version: "0"
144
133
  requirements:
145
134
  - none
146
135
  rubyforge_project: spree_auth
147
- rubygems_version: 1.3.7
136
+ rubygems_version: 1.3.6
148
137
  signing_key:
149
138
  specification_version: 3
150
139
  summary: Provides authentication and authorization services for use with Spree.