petergate 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/petergate.rb +6 -1
- data/lib/petergate/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: 91c85b6f22876391d247cc977089665b94230574
|
4
|
+
data.tar.gz: 2092fda54c52443bfb2df6cee9da073026eda443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81efb57941dd3632e7cfb44106efddf1ad0c7c1f9231a46fe8232ee98cdae77e1da5716898e7272de2abe82ad60a7f8955c3a64dde430cd46aa1a44f857c2a57
|
7
|
+
data.tar.gz: e3f2f8c13f9302dfd4f091ab0fbbb3decb128a66e24f75b21725fc09f726484b12437c4580c22164db33259a45abd3adc20c47449cdf9f0a22305b77cd5b0037
|
data/lib/petergate.rb
CHANGED
@@ -35,7 +35,12 @@ module PeterGate
|
|
35
35
|
message= defined?(check_access) ? check_access : true
|
36
36
|
if message.is_a?(String) || message == false
|
37
37
|
if user_signed_in?
|
38
|
-
|
38
|
+
respond_to do |format|
|
39
|
+
format.any(:js, :json, :xml) { render nothing: true, status: :forbidden }
|
40
|
+
format.html do
|
41
|
+
redirect_to (request.referrer || after_sign_in_path_for(current_user)), :notice => message || "Permission Denied"
|
42
|
+
end
|
43
|
+
end
|
39
44
|
else
|
40
45
|
authenticate_user!
|
41
46
|
end
|
data/lib/petergate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petergate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|