kant 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/kant/policy_access.rb +2 -2
- data/lib/kant/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1208a5ac943ff6c41e4eb13d0840c3e8b674e331b87858037bb028304295a0d5
|
4
|
+
data.tar.gz: '0019875fd523a5f12bfff8eef32a033b5c94ac3cabae65a219adba0c1e97143c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f3ca513b5b66f00244899a5a04fa2931b6b1344ffa0342c1f79717aba3380444f9a6ad54492fb226e9511369d45352fed4962457a1405a82d278e6c5ed11f19
|
7
|
+
data.tar.gz: d75f90ad67c99e9abdbd9f31bfbf2d078734bb633f6326f4c9a88b0e32a411722453b262f2ce0103d94d1bfd8526e8f5383d67d6e6d6a14b1e9deec22fc9de3d
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Kant v0.0.
|
1
|
+
# Kant v0.0.7 [![Build Status](https://travis-ci.org/markprzepiora/kant.svg?branch=master)](https://app.travis-ci.com/github/markprzepiora/kant)
|
2
2
|
|
3
3
|
Kant is a tiny authorization library for your Ruby (especially Rails and/or
|
4
4
|
ActiveRecord) projects.
|
data/lib/kant/policy_access.rb
CHANGED
@@ -37,12 +37,12 @@ module Kant
|
|
37
37
|
#
|
38
38
|
# ability.accessible(:read, Content)
|
39
39
|
# # => a Content scope
|
40
|
-
def accessible(action, scope, *rest)
|
40
|
+
def accessible(action, scope, *rest, **kwargs)
|
41
41
|
abilities = resolve_scope(scope)
|
42
42
|
_scope_method = scope_method(abilities, action)
|
43
43
|
|
44
44
|
if _scope_method
|
45
|
-
abilities.send(_scope_method, scope, user, *rest)
|
45
|
+
abilities.send(_scope_method, scope, user, *rest, **kwargs)
|
46
46
|
else
|
47
47
|
scope.none
|
48
48
|
end
|
data/lib/kant/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Przepiora
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.3.26
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: A tiny, non-magical authorization library
|