solidus_core 3.2.1 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 042052d428d45b820e494786dd25b4854e6d3c2f38e5ee080806174e0c677098
4
- data.tar.gz: a2a869fec21b3aec695772aac0ffa71db9297c804d335fa0a19837f8b3551846
3
+ metadata.gz: 544b2bfea9af16a2ae309c6eb5b4d2038b60cf592b461b9019d66933324cbab8
4
+ data.tar.gz: 36312a6f1b0b979c06e68125199834650b0f5fea1ee65af092136527b4121978
5
5
  SHA512:
6
- metadata.gz: 460488089ef09d746e12fbc3d6ce3497bd17fb949a60a1a6aeed35b1714c5702922876bb28a2c81729d9d937eeacde1469262bf8e94013850335730134146e3f
7
- data.tar.gz: 72fb6ebd3ff554117b0e1375ad8933834c02e709a48b87751ec83660043a77b34b4369b4c80067e50bfa1572dc1c2bae3ee14e9d31ab35a399dcb17674a2592c
6
+ metadata.gz: 4c5bbfc5dacae815c6ce863d2c807d2a4e49c448912f3c8e9f5e8901b5aa1b1c2e8d3bdeeea3ea3e76d116b66e6aa6e9eba307471023f44ed61806eaa3b662c6
7
+ data.tar.gz: 816d06788b22c4fe4b02780e0d640ba8f56a0186371ddbcf2e40cac9695a4f697e3a131cbc6d893321e42c741f27d63c48e7ce604958da5ed37957db451a5bfc
@@ -90,6 +90,21 @@ module Spree
90
90
  orders.none?
91
91
  end
92
92
 
93
+ # Updates the roles in keeping with the given ability's permissions
94
+ #
95
+ # Roles that are not accessible to the given ability will be ignored. It
96
+ # also ensure not to remove non accessible roles when assigning new
97
+ # accessible ones.
98
+ #
99
+ # @param given_roles [Spree::Role]
100
+ # @param ability [Spree::Ability]
101
+ def update_spree_roles(given_roles, ability:)
102
+ accessible_roles = Spree::Role.accessible_by(ability)
103
+ non_accessible_roles = Spree::Role.all - accessible_roles
104
+ new_accessible_roles = given_roles - non_accessible_roles
105
+ self.spree_roles = spree_roles - accessible_roles + new_accessible_roles
106
+ end
107
+
93
108
  private
94
109
 
95
110
  def check_for_deletion
@@ -30,7 +30,7 @@ module Solidus
30
30
  end
31
31
  end
32
32
 
33
- @generator_context.generate('solidus_frontend:install')
33
+ @generator_context.generate("solidus_frontend:install #{@generator_context.options[:auto_accept] ? '--auto-accept' : ''}")
34
34
  end
35
35
 
36
36
  def install_solidus_starter_frontend(installer_adds_auth)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "3.2.1"
4
+ VERSION = "3.2.2"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team