wagon_rails 0.5.2 → 0.5.3
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/lib/wagon_rails/version.rb +1 -1
- data/templates/application_controller.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f67671b3cf519ca5e750fcaa30096c6da69c419
|
4
|
+
data.tar.gz: cf3e856168c5f483c116630a3c0ab22a8a9f4d1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b22f57c18de2598ae01d22fb642f9a1644fdc4d65b26296255a23e81c5700558877fff9c74d4d0b717bf0b3ba8e7a4e63fb56a2e2895dd8dae501ad7ada3ac9d
|
7
|
+
data.tar.gz: 2daee2c0278055dfe9aff8a9d5e4ca15a34f1012b8e9252d5fd878f4d70ca4d65468d716c83632d5c8185114e15b21147dc793699f39ef88c98b5d24651d85d1
|
data/lib/wagon_rails/version.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
class ApplicationController < ActionController::Base
|
2
|
-
include Pundit
|
3
2
|
|
4
3
|
protect_from_forgery with: :exception
|
5
4
|
|
6
5
|
before_action :authenticate_user!, unless: :pages_controller?
|
7
6
|
|
8
|
-
#
|
9
|
-
#
|
10
|
-
|
7
|
+
# Uncomment these lines to get pundit
|
8
|
+
# include Pundit
|
9
|
+
# after_action :verify_authorized, except: :index, unless: :devise_or_pages_or_admin_controller?
|
10
|
+
# after_action :verify_policy_scoped, only: :index, unless: :devise_or_pages_or_admin_controller?
|
11
11
|
# rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
|
-
def
|
16
|
-
devise_controller? || pages_controller?
|
15
|
+
def devise_or_pages_or_admin_controller?
|
16
|
+
devise_controller? || pages_controller? || params[:controller] =~ /^admin/
|
17
17
|
end
|
18
18
|
|
19
19
|
def pages_controller?
|