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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf046fb139b2a599dab54c1650fb392e4691a24f
4
- data.tar.gz: 25642a8389b0797353ee76a647f28e54e896255d
3
+ metadata.gz: bf6ecc055e5c36c900208265feb5958716195fc9
4
+ data.tar.gz: 6bd525b4272b3455220ccc96b467089825be8ae0
5
5
  SHA512:
6
- metadata.gz: 72a5f656116577d33657330ea322f74b1744f71a886901eacc38c72d41702b723a65a21ccc2a39909bcc72d46411c8792f923441ce7ec0bebcdbf6919a0bf1b1
7
- data.tar.gz: 90cea58e2cb37d17bfcf1bce1117287aec4e34fc7ffd583f243a1622ddffa36091bc0d6ad8b0784667430bcc187bdc48919e624f94c26447f8bb501db5d66ca3
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
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "spree_marketplace"
6
- s.version = "3.1.1"
6
+ s.version = "3.1.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_marketplace
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Y F