expat 0.1.4 → 0.1.5

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: 31ca8ac6ad2a8610d030494ffc7ec5fe403abe2d
4
- data.tar.gz: a605d397653aaf7f917734152114f6c11986f6f2
3
+ metadata.gz: 59d83971af61ead04c1bdbcbe130dc650e241cf6
4
+ data.tar.gz: 90bb895aa6b00ef8a83b0bd20a0d37a8202fb899
5
5
  SHA512:
6
- metadata.gz: 9a5013314ac03820e0396bfbadedd55a202d8b173b4e69f60156add9f77f6d0ec2cfff7d55b4e10d9494155c45533fe3f50e4f2e732ecbbd86dfbc6f485e764b
7
- data.tar.gz: 8b5cf7ab219315b891fa574bcda086dc02fc11952a8d02aea56ac36b5a9020ae454bcb78df32dc5a83ca73fa8430f399175945b788e324d8563c2b91562b9523
6
+ metadata.gz: cb825f8405636edde0814dd5f0c09d4b31f78b14e7b9b336ef7d1fff51167195d98e7e180f8560df73d654569bbb762543312f588c0fc9bba2cd79b0404b7ecd
7
+ data.tar.gz: 015a2931e3498260f795d8ced7383873777b9b192b87bbebe6f2397bfa45818bad8aad734d25ee810d7971322798b9a120e1056c21d7a11bcba9058ac8f75a8f
@@ -1,7 +1,9 @@
1
1
  module Expat
2
- class ApplicationController < ActionController::Base
2
+ class ApplicationController < ::ApplicationController
3
3
  protect_from_forgery with: :exception
4
4
 
5
+ before_action :authenticate_expat_user
6
+
5
7
  protected
6
8
 
7
9
  def list_locales
@@ -15,5 +17,11 @@ module Expat
15
17
 
16
18
  locales
17
19
  end
20
+
21
+ def authenticate_expat_user
22
+ if respond_to?(:expat_user) && expat_user.nil?
23
+ render text: 'unauthorized'
24
+ end
25
+ end
18
26
  end
19
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Groeneveld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails