tramway-api 1.8.1 → 1.8.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tramway/api.rb +1 -0
- data/lib/tramway/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d1e2133a961aaba201c222f211ca45a609f559b89d44622c345e802f29f67a6
|
4
|
+
data.tar.gz: f8856dba0c3e478af5436cdf93df7a77cfb4b876fed6ce1c3a41c9f7da710674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8143cc790cebc76de7dcd2746204bc8503a4a74ed9b4eefb3068e65cc456b6920a775d0cc107acd01c9dd651cd4c87a6394cf6cf807ca37626a13bd2b60adc08
|
7
|
+
data.tar.gz: 45b9ec7765178d2d26869ec69bfc315b4c714fd5632aa1d86e537ea793617aac85a59dd3f08ea11f3139d5b008ebf49772888557c13859bd7a0975d68a8cd21e
|
data/lib/tramway/api.rb
CHANGED
@@ -56,6 +56,7 @@ module Tramway
|
|
56
56
|
|
57
57
|
def action_is_available(project:, role: :open, model_name:, action:, current_user: nil)
|
58
58
|
actions = select_actions(project: project, role: role, model_name: model_name)
|
59
|
+
raise "Looks like you did not used array type to define action permissions. Remember it should be this way: `#{model_name} => [ :#{action} ]` or `#{model_name} => [ { #{action}: lambda { |record, current_user| your_condition } } ]`" if actions.present? && !actions.is_a?(Array)
|
59
60
|
availability = actions&.select do |a|
|
60
61
|
if a.is_a? Symbol
|
61
62
|
a == action.to_sym
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.1
|
4
|
+
version: 1.8.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|