solidus_core 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 544b2bfea9af16a2ae309c6eb5b4d2038b60cf592b461b9019d66933324cbab8
|
4
|
+
data.tar.gz: 36312a6f1b0b979c06e68125199834650b0f5fea1ee65af092136527b4121978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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)
|
data/lib/spree/core/version.rb
CHANGED