effective_orders 1.5.9 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/app/controllers/admin/customers_controller.rb +2 -1
- data/app/controllers/admin/order_items_controller.rb +1 -0
- data/app/controllers/admin/orders_controller.rb +1 -0
- data/app/views/effective/orders/_order.html.haml +1 -1
- data/lib/effective_orders/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9594a00af04e8a3fa775560e34d35e9181e70919
|
4
|
+
data.tar.gz: 78aca75f4a95e83b1d512c8537346bba1f41a78f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c32c82987c9746f17821c14da0f8d83ede0a180290eb6ad9813f5cda5cc0cbf76ec900e581279e9355247146e1d0aca3f3314658240fe1c371028d21aa8edaf4
|
7
|
+
data.tar.gz: 5aebd22e4161a00b0db47c7b606055f884e29d4a9f9b1a800fa97aa23b7cfa5c7a789b9e89bf2148ebaf11980144e5be84debc74ab805cb6771f5b3480c1bc8f
|
data/README.md
CHANGED
@@ -406,7 +406,7 @@ end
|
|
406
406
|
|
407
407
|
### Permissions
|
408
408
|
|
409
|
-
The permissions you actually want to define are as follows (using CanCan):
|
409
|
+
The permissions you actually want to define for a regular user are as follows (using CanCan):
|
410
410
|
|
411
411
|
```ruby
|
412
412
|
can [:manage], Effective::Cart, :user_id => user.id
|
@@ -414,6 +414,13 @@ can [:manage], Effective::Order, :user_id => user.id # Orders cannot be deleted
|
|
414
414
|
can [:manage], Effective::Subscription, :user_id => user.id
|
415
415
|
```
|
416
416
|
|
417
|
+
In addition to the above, the following permissions allow access to the `/admin` screens:
|
418
|
+
|
419
|
+
```ruby
|
420
|
+
can :admin, :effective_orders # Can access the admin screens
|
421
|
+
can :show, :payment_details # Can see the payment purchase details on orders
|
422
|
+
```
|
423
|
+
|
417
424
|
## Whats Included
|
418
425
|
|
419
426
|
This gem has a lot of screens, all of which are automatically available via the Rails Engine.
|
@@ -754,6 +761,8 @@ Once Order id=1 has been purchased/declined, you will be unable to purchase an o
|
|
754
761
|
|
755
762
|
## Paying via Stripe
|
756
763
|
|
764
|
+
Make sure `gem 'stripe'` is included in your Gemfile.
|
765
|
+
|
757
766
|
First register for an account with Stripe
|
758
767
|
|
759
768
|
https://manage.stripe.com/register
|
@@ -3,11 +3,12 @@ module Admin
|
|
3
3
|
before_filter :authenticate_user! # This is devise, ensure we're logged in.
|
4
4
|
|
5
5
|
layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:admin_customers] : EffectiveOrders.layout)
|
6
|
-
|
6
|
+
|
7
7
|
def index
|
8
8
|
@datatable = Effective::Datatables::Customers.new() if defined?(EffectiveDatatables)
|
9
9
|
@page_title = 'Customers'
|
10
10
|
|
11
|
+
EffectiveOrders.authorized?(self, :admin, :effective_orders)
|
11
12
|
EffectiveOrders.authorized?(self, :index, Effective::Customer)
|
12
13
|
end
|
13
14
|
|
@@ -8,6 +8,7 @@ module Admin
|
|
8
8
|
@datatable = Effective::Datatables::OrderItems.new() if defined?(EffectiveDatatables)
|
9
9
|
@page_title = 'Order Items'
|
10
10
|
|
11
|
+
EffectiveOrders.authorized?(self, :admin, :effective_orders)
|
11
12
|
EffectiveOrders.authorized?(self, :index, Effective::OrderItem)
|
12
13
|
end
|
13
14
|
end
|
@@ -6,5 +6,5 @@
|
|
6
6
|
= render partial: 'effective/orders/order_shipping', locals: {order: order}
|
7
7
|
= render partial: 'effective/orders/order_items', locals: {order: order}
|
8
8
|
|
9
|
-
- if (EffectiveOrders.authorized?(controller, :
|
9
|
+
- if (EffectiveOrders.authorized?(controller, :show, :payment_details) rescue false)
|
10
10
|
= render partial: 'effective/orders/order_payment_details', locals: {order: order}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -136,20 +136,6 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 1.0.2
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: stripe
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 1.19.0
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 1.19.0
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: stripe-ruby-mock
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|