solidus_backend 1.0.0 → 1.0.1

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ad1ea97e6eba75e3721dfbcfccb3ecdab77f20c
4
- data.tar.gz: ac4f60aa2bb9d1ea90931347730716133b1b2d0c
3
+ metadata.gz: 05228aae0a6878a6466268d87e53fe6343c97a21
4
+ data.tar.gz: ca8f5eda25b2bab048b41d19a8152dd7e0d33dfd
5
5
  SHA512:
6
- metadata.gz: ef95b53304aeca0b04fa3ca02668f3e78b03e122c4ecfdc4d1bb35331b4f37f2eaefa285527c83410858d13adee83ab40f37abe7216e5171c6f91b9744b5256a
7
- data.tar.gz: 4f09774738182a56cbd452d32698a041600d2509ff25ecf304c6b8a3d6eba19775a1fb2b8a119f80364407de3bb8ffba6f6db8822a96f2a729e18a219313b506
6
+ metadata.gz: 50c3569eaba93328767a52d4a21cff918fd66033b0a6ce221a6fa8d82b3398bc26ca2784b7ee059a913e3a1026ad0cba458b1c4dee53cd8531e43395d7f215e7
7
+ data.tar.gz: 06f5329b90aede3327936428f7da9a235ba424b0e4581b8087ad11edb72456447f39b8dfb5a45ab1bbbcc7cfdaa0f549982f0f46c4c1338aefd8c105ee29df82
@@ -35,6 +35,10 @@ module Spree
35
35
  @order = Order.find_by_number!(params[:order_id])
36
36
  authorize! action, @order
37
37
  end
38
+
39
+ def model_class
40
+ Spree::OrderCancellations
41
+ end
38
42
  end
39
43
  end
40
44
  end
@@ -159,9 +159,16 @@ module Spree
159
159
  end
160
160
 
161
161
  def set_roles
162
- return unless user_params[:spree_role_ids]
163
-
164
- @user.spree_roles = Spree::Role.where(id: user_params[:spree_role_ids])
162
+ # FIXME: user_params permits the roles that can be set, if spree_role_ids is set.
163
+ # when submitting a user with no roles, the param is not present. Because users can be updated
164
+ # with some users being able to set roles, and some users not being able to set roles, we have to check
165
+ # if the roles should be cleared, or unchanged again here. The roles form should probably hit a seperate
166
+ # action or controller to remedy this.
167
+ if user_params[:spree_role_ids]
168
+ @user.spree_roles = Spree::Role.where(id: user_params[:spree_role_ids])
169
+ elsif can?(:manage, Spree::Role)
170
+ @user.spree_roles = []
171
+ end
165
172
  end
166
173
 
167
174
  def set_stock_locations
@@ -54,7 +54,7 @@
54
54
  <% end %>
55
55
  <% end %>
56
56
 
57
- <% if can?(:short_ship, @order) && @order.inventory_units.cancelable.present? %>
57
+ <% if can?(:manage, Spree::OrderCancellations) && @order.inventory_units.cancelable.present? %>
58
58
  <%= content_tag('li', :class => ('active' if current == 'Cancel Inventory'), :data => {:hook => 'admin_order_tabs_cancel_inventory'}) do %>
59
59
  <%= link_to_with_icon 'cancel', Spree.t(:cancel_inventory), admin_order_cancellations_path(@order) %>
60
60
  <% end %>
@@ -30,9 +30,6 @@
30
30
  <legend><%= Spree.t('access', :scope => 'api') %></legend>
31
31
 
32
32
  <% if @user.spree_api_key.present? %>
33
- <div class="field">
34
- <div id="current-api-key"><%= Spree.t('key', :scope => 'api') %>: <%= @user.spree_api_key %></div>
35
- </div>
36
33
  <div class="filter-actions actions">
37
34
  <%= form_tag spree.clear_api_key_admin_user_path(@user), :method => :put do %>
38
35
  <%= button Spree.t('clear_key', :scope => 'api'), 'trash' %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: 1.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: 1.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 1.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: 1.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bourbon
43
43
  requirement: !ruby/object:Gem::Requirement