ishapi 0.1.8.83 → 0.1.8.84
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: 580afca9946792fc16b0e740aeebe5e668ab4475
|
4
|
+
data.tar.gz: b1dbcf23e708cbd6e9ed6239ca08c358cf3e675e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 679fea13081466918b96a8e5766d124f99fc212a97c68f16e6d024f6fc945bab89466fea8e75fab0f25edcd1f21225944e98cd6cbe365a7ec34220730d2f3c3c
|
7
|
+
data.tar.gz: 15724413ffc4b8b4fc878dde5c28740536f871999c39125607fab5a34557b1417cd454fa3c39ff6f59ce789a3391906b485892387a249764d2a5bcd0882d340c
|
@@ -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,7 +1,7 @@
|
|
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.84
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -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
|