spree_auth 1.1.3 → 1.1.4

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.

@@ -20,7 +20,7 @@ Spree::BaseController.class_eval do
20
20
  format.html do
21
21
  if current_user
22
22
  flash.now[:error] = t(:authorization_failure)
23
- render 'spree/shared/unauthorized', :layout => '/spree/layouts/spree_application', :status => 401
23
+ render 'spree/shared/unauthorized', :layout => Spree::Config[:layout], :status => 401
24
24
  else
25
25
  store_location
26
26
  redirect_to spree.login_path and return
@@ -46,6 +46,11 @@ module Spree
46
46
  order.user == user || order.token && token == order.token
47
47
  end
48
48
  can :create, Order
49
+
50
+ can :read, Address do |address|
51
+ address.user == user
52
+ end
53
+
49
54
  #############################
50
55
  can :read, Product
51
56
  can :index, Product
@@ -2,7 +2,7 @@
2
2
  <ul id="login-nav">
3
3
  <li><%= t(:logged_in_as) %>: <%= current_user.email %></li>
4
4
  <li><%= link_to t(:account), spree.edit_user_path(current_user) %></li>
5
- <li><%= link_to t(:logout), spree.destroy_user_session_path, :method => :delete %></li>
5
+ <li><%= link_to t(:logout), spree.destroy_user_session_path %></li>
6
6
  <li><%= link_to t(:store), spree.products_path %></li>
7
7
  </ul>
8
8
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <% if current_user %>
2
2
  <li><%= link_to t(:my_account), spree.account_path %></li>
3
- <li><%= link_to t(:logout), spree.destroy_user_session_path, :method => :delete %></li>
3
+ <li><%= link_to t(:logout), spree.destroy_user_session_path %></li>
4
4
  <% else %>
5
5
  <li id="link-to-login"><%= link_to t(:login), spree.login_path %></li>
6
6
  <% end %>
@@ -139,5 +139,5 @@ Devise.setup do |config|
139
139
  # change their passwords.
140
140
  config.reset_password_within = 6.hours
141
141
 
142
- config.sign_out_via = :delete
142
+ config.sign_out_via = :get
143
143
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-27 00:00:00.000000000Z
12
+ date: 2012-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
- requirement: &70154239693880 !ruby/object:Gem::Requirement
16
+ requirement: &70292673468860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 1.1.3
21
+ version: 1.1.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70154239693880
24
+ version_requirements: *70292673468860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: devise
27
- requirement: &70154239693300 !ruby/object:Gem::Requirement
27
+ requirement: &70292673464040 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70154239693300
35
+ version_requirements: *70292673464040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cancan
38
- requirement: &70154239692740 !ruby/object:Gem::Requirement
38
+ requirement: &70292673478080 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.6.7
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70154239692740
46
+ version_requirements: *70292673478080
47
47
  description: Required dependency for Spree
48
48
  email: sean@spreecommerce.com
49
49
  executables: []
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  segments:
136
136
  - 0
137
- hash: -3581941900591620935
137
+ hash: 389618216574593800
138
138
  requirements:
139
139
  - none
140
140
  rubyforge_project: