gb_mapfish_appserver 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -160,7 +160,7 @@ class WmsController < ApplicationController
160
160
 
161
161
  def add_filter(topic_name)
162
162
  unless params[:LAYERS].blank?
163
- filters = access_filters(topic_name, params[:LAYERS].split(','))
163
+ filters = Wms.access_filters(current_ability, current_user, topic_name, params[:LAYERS].split(','))
164
164
  if filters.any?
165
165
  # remove existing filters
166
166
  filters.each do |key, value|
@@ -172,22 +172,6 @@ class WmsController < ApplicationController
172
172
  end
173
173
  end
174
174
 
175
- def access_filters(topic_name, layers)
176
- access_filters = {}
177
- unless topic_name.blank?
178
- layers.each do |layer|
179
- access_filter = current_ability.access_filter("WMS", topic_name, layer)
180
- unless access_filter.nil?
181
- access_filter.each do |key, value|
182
- access_filter[key] = AccessFilter.user_value(current_user, value)
183
- end
184
- access_filters.merge!(access_filter)
185
- end
186
- end
187
- end
188
- access_filters
189
- end
190
-
191
175
  #Public accessible WMS
192
176
  #REMARK: permission change needs restart!
193
177
  def public?(name, zone)
@@ -8,4 +8,21 @@ class Wms
8
8
  def initialize(name)
9
9
  @name = name
10
10
  end
11
+
12
+ def self.access_filters(ability, user, topic_name, layers)
13
+ access_filters = {}
14
+ unless topic_name.blank?
15
+ layers.each do |layer|
16
+ access_filter = ability.access_filter("WMS", topic_name, layer)
17
+ unless access_filter.nil?
18
+ access_filter.each do |key, value|
19
+ access_filter[key] = AccessFilter.user_value(user, value)
20
+ end
21
+ access_filters.merge!(access_filter)
22
+ end
23
+ end
24
+ end
25
+ access_filters
26
+ end
27
+
11
28
  end
@@ -1,3 +1,3 @@
1
1
  module GbMapfishAppserver
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gb_mapfish_appserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2014-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &26064120 !ruby/object:Gem::Requirement
16
+ requirement: &12419980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.13
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26064120
24
+ version_requirements: *12419980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &26063700 !ruby/object:Gem::Requirement
27
+ requirement: &12419560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *26063700
35
+ version_requirements: *12419560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: acts_as_tree
38
- requirement: &26062900 !ruby/object:Gem::Requirement
38
+ requirement: &12419020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *26062900
46
+ version_requirements: *12419020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: devise
49
- requirement: &26062100 !ruby/object:Gem::Requirement
49
+ requirement: &12418520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.2.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *26062100
57
+ version_requirements: *12418520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cancan
60
- requirement: &26061160 !ruby/object:Gem::Requirement
60
+ requirement: &12418020 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.6.8
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *26061160
68
+ version_requirements: *12418020
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails_admin
71
- requirement: &26060420 !ruby/object:Gem::Requirement
71
+ requirement: &12417300 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.4.0
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *26060420
79
+ version_requirements: *12417300
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: fastercsv
82
- requirement: &26060000 !ruby/object:Gem::Requirement
82
+ requirement: &12416680 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *26060000
90
+ version_requirements: *12416680
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: sass
93
- requirement: &26059400 !ruby/object:Gem::Requirement
93
+ requirement: &12416100 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 3.2.12
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *26059400
101
+ version_requirements: *12416100
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: GeoRuby
104
- requirement: &26066080 !ruby/object:Gem::Requirement
104
+ requirement: &12415540 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.1.4
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *26066080
112
+ version_requirements: *12415540
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rgeo
115
- requirement: &26065380 !ruby/object:Gem::Requirement
115
+ requirement: &12414840 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.3.20
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *26065380
123
+ version_requirements: *12414840
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rgeo-geojson
126
- requirement: &26064380 !ruby/object:Gem::Requirement
126
+ requirement: &12414120 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.2.3
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *26064380
134
+ version_requirements: *12414120
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: hpricot
137
- requirement: &26063840 !ruby/object:Gem::Requirement
137
+ requirement: &12413720 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *26063840
145
+ version_requirements: *12413720
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: pg
148
- requirement: &26062800 !ruby/object:Gem::Requirement
148
+ requirement: &12413160 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 0.14.0
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *26062800
156
+ version_requirements: *12413160
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: activerecord-postgis-adapter
159
- requirement: &26061400 !ruby/object:Gem::Requirement
159
+ requirement: &12412620 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - =
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: 0.4.1
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *26061400
167
+ version_requirements: *12412620
168
168
  description: Mapfish Appserver is a framework for web mapping applications using OGC
169
169
  standards and the Mapfish protocol.
170
170
  email: