ishapi 0.1.8.80 → 0.1.8.81
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc534cf07322696ddae09e7df8c1084897f186de
|
4
|
+
data.tar.gz: 91b9a27b912e2aa692880c8f4c697492a49f3f8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff5e4672c321cba19f1a7a31d6f9d9b3a10cb2de088fbda91667f6770933a5b7bcdc5618acad429f31aa0c00017a97cbb35702bbe77a7655941d12945019aa27
|
7
|
+
data.tar.gz: 80f8ec92dc38eb0d330f7bd1264bdcb55e003dbe2006df67efa779309093d564c8694d9c8b650d2198e6e294941ab817b35fbe6fdd2d93b5e6d226fbf92fe382
|
@@ -1,7 +1,13 @@
|
|
1
1
|
require_dependency "ishapi/application_controller"
|
2
2
|
|
3
3
|
module Ishapi
|
4
|
-
class CitiesController <
|
4
|
+
class CitiesController < UnrestrictedController
|
5
|
+
protect_from_forgery :prepend => true, :with => :exception
|
6
|
+
layout :false
|
7
|
+
|
8
|
+
check_authorization
|
9
|
+
skip_before_action :verify_authenticity_token
|
10
|
+
before_action :set_current_ability
|
5
11
|
|
6
12
|
def index
|
7
13
|
authorize! :index, City
|
@@ -18,5 +24,14 @@ module Ishapi
|
|
18
24
|
authorize! :show, @city
|
19
25
|
end
|
20
26
|
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
def set_current_ability
|
33
|
+
@current_ability ||= ::Ishapi::Ability.new( User.new )
|
34
|
+
end
|
35
|
+
|
21
36
|
end
|
22
37
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Ishapi
|
2
|
+
class UnrestrictedController < ActionController::Base
|
3
|
+
protect_from_forgery :prepend => true, :with => :exception
|
4
|
+
layout :false
|
5
|
+
|
6
|
+
before_action :set_current_ability
|
7
|
+
|
8
|
+
check_authorization
|
9
|
+
skip_before_action :verify_authenticity_token
|
10
|
+
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
|
15
|
+
def set_current_ability
|
16
|
+
@current_ability ||= ::Ishapi::Ability.new( User.new )
|
17
|
+
end
|
18
|
+
|
19
|
+
def puts! a, b=''
|
20
|
+
puts "+++ +++ #{b}"
|
21
|
+
puts a.inspect
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- app/controllers/ishapi/reports_controller.rb
|
200
200
|
- app/controllers/ishapi/sites_controller.rb
|
201
201
|
- app/controllers/ishapi/tags_controller.rb
|
202
|
+
- app/controllers/ishapi/unrestricted_controller.rb
|
202
203
|
- app/controllers/ishapi/user_profiles_controller.rb
|
203
204
|
- app/controllers/ishapi/users_controller.rb
|
204
205
|
- app/controllers/ishapi/venues_controller.rb
|