spree_marketplace 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/supplier_ability.rb +0 -19
- data/spree_marketplace.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf6ecc055e5c36c900208265feb5958716195fc9
|
4
|
+
data.tar.gz: 6bd525b4272b3455220ccc96b467089825be8ae0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a10ab9688115b98dd71957e9c0df1b7c8fd858cadfac4cbe10bee583a40a64d15bf1a3f6a3c9529ad4965ab3135389cf9ca94e968cde7df27a8b2c02ef5f1edb
|
7
|
+
data.tar.gz: 1cce3c6a3902bec870f80d4ec5f687bb8a4c78f90f50185fd9bd4f7e87912af379745f72fd497aaa938fca2442d1b48838c26e85e7199bc419498367e5b822ad
|
@@ -2,36 +2,17 @@ module Spree
|
|
2
2
|
class SupplierAbility
|
3
3
|
include CanCan::Ability
|
4
4
|
|
5
|
-
require "byebug"
|
6
5
|
def initialize(user)
|
7
6
|
user ||= Spree.user_class.new
|
8
7
|
|
9
8
|
if user.supplier and user.supplier.approved == true
|
10
9
|
|
11
|
-
# conditions = {supplier_id: user.supplier_id}
|
12
|
-
|
13
|
-
# can :products, :review_admissions
|
14
|
-
|
15
|
-
# can :read, :all
|
16
|
-
# can [:admin, :manage,:index], Spree::Review do |product|
|
17
|
-
# product.supplier_ids.include?(user.supplier_id)
|
18
|
-
# end
|
19
|
-
|
20
|
-
# can [:admin, :manage, :index], Spree::Review do |product|
|
21
|
-
# product.supplier_ids.include?(user.supplier_id)
|
22
|
-
# end
|
23
|
-
# can [:admin,:manage], Spree::Review
|
24
10
|
|
25
11
|
can [:admin,:manage,:index], Spree::Supplier, id: user.supplier_id
|
26
12
|
|
27
|
-
|
28
|
-
|
29
13
|
# can [:create], Spree::AdmissionReview
|
30
14
|
# can [:admin, :manage], Spree::AdmissionReview, supplier: { supplier_id: user.supplier_id }
|
31
15
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
16
|
can [:admin, :manage, :stock,:admission], Spree::Product do |product|
|
36
17
|
product.supplier_ids.include?(user.supplier_id)
|
37
18
|
end
|
data/spree_marketplace.gemspec
CHANGED