paid_up 0.5.1 → 0.5.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
  SHA1:
3
- metadata.gz: 8fadc8927a10d132b9b1af5274c53632309b76d4
4
- data.tar.gz: 42ad0db19faa36a989bbd65cbffc1a7917e0dd80
3
+ metadata.gz: 81e5f72c66ad036f7931d76d5fdf1337180865bd
4
+ data.tar.gz: 72bcbb1e582fa12e6bdfab53a43e9f4ac4dd137b
5
5
  SHA512:
6
- metadata.gz: 3fd998ec7134c29852005323bf68f4e9efff552cde90d018564031a2d8c5401214a6eeaba09b9cb6cc35a22fadaeb7eb1b5e13a76600b7b15330fd58c6869819
7
- data.tar.gz: 4730dd129b782e7936e0aba9dbfba287135452bee69a4f5a284f5a8e92aa02a6a78ec9a3b925ad2264b754ff81a1035c628d2cf2520f1731b7fee31fbf8ee824
6
+ metadata.gz: 4f714408b18f391098fc3a03c9e39b7b471987cba2744ab958c27e068953a613296287d8051bbfa4ca647ad44acbb8e881ec585530daf01281da6dc537dde3cf
7
+ data.tar.gz: d136cadb0e7014cc44164f3a9d0c0473e9573ac735b528fced01b3a56195441381fac5eafe174c9e31f1cc6aec5c96f3b012cd8c57e3c9cb78ec1de9d7ebbac4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -7,7 +7,7 @@ module PaidUp
7
7
  for feature in features
8
8
  case feature.setting_type
9
9
  when 'table_rows'
10
- can :read, feature.feature_model
10
+ can [:index, :read], feature.feature_model
11
11
  if user.table_rows_allowed(feature.slug) > 0 || user.table_rows_unlimited?(feature.slug)
12
12
  can :manage, feature.feature_model, :user => user
13
13
  can :own, feature.feature_model
@@ -21,15 +21,11 @@ module PaidUp
21
21
  cannot :create, feature.feature_model
22
22
  end
23
23
  when 'rolify_rows'
24
- can :read, feature.feature_model
24
+ can [:index, :read], feature.feature_model
25
25
  if user.rolify_rows_allowed(feature.slug) > 0 || user.rolify_rows_unlimited?(feature.slug)
26
- can :manage, feature.feature_model do |record|
27
- user.has_role? :owner, record
28
- end
26
+ can :manage, feature.feature_model, id: Group.with_role(:owner, user).pluck(:id)
29
27
  can :own, feature.feature_model
30
- if user.rolify_rows_remaining(feature.slug) > 0
31
- can :create, feature.feature_model
32
- else
28
+ unless user.rolify_rows_remaining(feature.slug) > 0
33
29
  cannot :create, feature.feature_model
34
30
  end
35
31
  else
data/paid_up.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: paid_up 0.5.1 ruby lib
5
+ # stub: paid_up 0.5.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "paid_up"
9
- s.version = "0.5.1"
9
+ s.version = "0.5.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren