spree_auth 0.40.0 → 0.40.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.

@@ -1,14 +1,8 @@
1
1
  OrdersController.class_eval do
2
- after_filter :store_guest, :only => :populate
3
2
  before_filter :check_authorization
4
3
 
5
4
  private
6
5
 
7
- def store_guest
8
- return if current_user
9
- session[:access_token] = @order.token
10
- end
11
-
12
6
  def check_authorization
13
7
  session[:access_token] ||= params[:token]
14
8
  order = current_order || Order.find_by_number(params[:id])
@@ -5,4 +5,10 @@ Spree::CurrentOrder.module_eval do
5
5
  @current_order.user ||= current_user
6
6
  end
7
7
 
8
+ def after_save_new_order
9
+ # make sure the user has permission to access the order (if they are a guest)
10
+ return if current_user
11
+ session[:access_token] = @current_order.token
12
+ end
13
+
8
14
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_auth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 191
4
+ hash: 189
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 40
9
- - 0
10
- version: 0.40.0
9
+ - 1
10
+ version: 0.40.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Schofield
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-22 00:00:00 -05:00
18
+ date: 2011-01-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - "="
28
28
  - !ruby/object:Gem::Version
29
- hash: 191
29
+ hash: 189
30
30
  segments:
31
31
  - 0
32
32
  - 40
33
- - 0
34
- version: 0.40.0
33
+ - 1
34
+ version: 0.40.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ">="
59
+ - - "="
60
60
  - !ruby/object:Gem::Version
61
61
  hash: 29
62
62
  segments: