authority 3.2.1 → 3.2.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 +4 -4
- data/CHANGELOG.markdown +8 -0
- data/lib/authority/controller.rb +9 -3
- data/lib/authority/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 209f70400ce02fb82c4ecb564e7f21607d48be15
|
|
4
|
+
data.tar.gz: 9175a6345c96dbe3dd3f18278b35679f4a061677
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 270796016add52f4a991b33de28b1f835b84fa66ae4c1f38bf3d5996d352b640d2ada5d700a38e6a5c6617391886b948620ca6123ffdfeaa9daec560bcce5109
|
|
7
|
+
data.tar.gz: 0836bfb4004649c65c47bfb09558d2e91f954e235a157364519852502288083df11a675b008dcf634dc086314e9d59e965ac3a6a3ca599ffe0f8de1e2a4946e2
|
data/CHANGELOG.markdown
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Authority does its best to use [semantic versioning](http://semver.org).
|
|
4
4
|
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
(nothing)
|
|
8
|
+
|
|
9
|
+
## 3.2.2
|
|
10
|
+
|
|
11
|
+
- [Fix Rails 5 `after_filter` deprecation warning](https://github.com/nathanl/authority/pull/115), thanks to [Erik Axel Nielsen](https://github.com/erikaxel))
|
|
12
|
+
|
|
5
13
|
## 3.2.1
|
|
6
14
|
|
|
7
15
|
- Allow supplying extra arguments to authorizers in `authorize_actions_for` via the `:args` parameter.
|
data/lib/authority/controller.rb
CHANGED
|
@@ -77,9 +77,15 @@ module Authority
|
|
|
77
77
|
|
|
78
78
|
# Convenience wrapper for instance method
|
|
79
79
|
def ensure_authorization_performed(options = {})
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
if respond_to? :after_action
|
|
81
|
+
after_action(options.slice(:only, :except)) do |controller_instance|
|
|
82
|
+
controller_instance.ensure_authorization_performed(options)
|
|
83
|
+
end
|
|
84
|
+
else
|
|
85
|
+
after_filter(options.slice(:only, :except)) do |controller_instance|
|
|
86
|
+
controller_instance.ensure_authorization_performed(options)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
83
89
|
end
|
|
84
90
|
|
|
85
91
|
# The controller action to authority action map used for determining
|
data/lib/authority/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: authority
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Long
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-12-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|