wagon_rails 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4fb68087bd633188394dd3d3bd5d3633d8e7392
4
- data.tar.gz: 8c20f31b40168b22d14d0af13ee2f4f8468d46d4
3
+ metadata.gz: 7f67671b3cf519ca5e750fcaa30096c6da69c419
4
+ data.tar.gz: cf3e856168c5f483c116630a3c0ab22a8a9f4d1c
5
5
  SHA512:
6
- metadata.gz: 4376e172e41a4e552f8bd7285a8a2cb08a9af7fe454b01da1f6984c9ecf0f99f866023a98be7b543b8b371d850a61c7c13333458ffa110468c1e1768738df15b
7
- data.tar.gz: dd1a1698d7b1a6682bd73ec388e619108913974459669d82daf0eebc635f6d3e1872844f9301e9524314d178126e66c6e0ad31255d7d43b9ea49faecdec002f4
6
+ metadata.gz: b22f57c18de2598ae01d22fb642f9a1644fdc4d65b26296255a23e81c5700558877fff9c74d4d0b717bf0b3ba8e7a4e63fb56a2e2895dd8dae501ad7ada3ac9d
7
+ data.tar.gz: 2daee2c0278055dfe9aff8a9d5e4ca15a34f1012b8e9252d5fd878f4d70ca4d65468d716c83632d5c8185114e15b21147dc793699f39ef88c98b5d24651d85d1
@@ -1,5 +1,5 @@
1
1
  module WagonRails
2
2
  RAILS_VERSION = "4.2.3"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.3"
5
5
  end
@@ -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
- # after_action :verify_authorized, except: :index, unless: :devise_or_pages_controller?
9
- # after_action :verify_policy_scoped, only: :index, unless: :devise_or_pages_controller?
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 devise_or_pages_controller?
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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wagon_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssaunier