Commit 7ee602662bcede021d8a16b2fd76ba9b408291b2
1 parent
38397dbe
Exists in
master
omniauth-env applyed
Showing
10 changed files
with
207 additions
and
149 deletions
Show diff stats
Gemfile
@@ -133,6 +133,7 @@ gem "underscore-rails", "~> 1.4.4" | @@ -133,6 +133,7 @@ gem "underscore-rails", "~> 1.4.4" | ||
133 | 133 | ||
134 | # Sanitize user input | 134 | # Sanitize user input |
135 | gem "sanitize" | 135 | gem "sanitize" |
136 | +gem "omniauth-env", git: "https://github.com/colab-community/omniauth-env.git" | ||
136 | 137 | ||
137 | # Protect against bruteforcing | 138 | # Protect against bruteforcing |
138 | gem "rack-attack" | 139 | gem "rack-attack" |
Gemfile.lock
1 | +GIT | ||
2 | + remote: https://github.com/colab-community/omniauth-env.git | ||
3 | + revision: 3bdf3750a81f260063c3470ccc0d86070d01c552 | ||
4 | + specs: | ||
5 | + omniauth-env (0.0.1) | ||
6 | + gitlab_omniauth-ldap (~> 1.0.3) | ||
7 | + omniauth (~> 1.0) | ||
8 | + | ||
1 | GEM | 9 | GEM |
2 | remote: https://rubygems.org/ | 10 | remote: https://rubygems.org/ |
3 | specs: | 11 | specs: |
4 | - actionmailer (4.0.2) | ||
5 | - actionpack (= 4.0.2) | 12 | + actionmailer (4.0.4) |
13 | + actionpack (= 4.0.4) | ||
6 | mail (~> 2.5.4) | 14 | mail (~> 2.5.4) |
7 | - actionpack (4.0.2) | ||
8 | - activesupport (= 4.0.2) | 15 | + actionpack (4.0.4) |
16 | + activesupport (= 4.0.4) | ||
9 | builder (~> 3.1.0) | 17 | builder (~> 3.1.0) |
10 | erubis (~> 2.7.0) | 18 | erubis (~> 2.7.0) |
11 | rack (~> 1.5.2) | 19 | rack (~> 1.5.2) |
12 | rack-test (~> 0.6.2) | 20 | rack-test (~> 0.6.2) |
13 | - actionpack-action_caching (1.1.0) | 21 | + actionpack-action_caching (1.1.1) |
14 | actionpack (>= 4.0.0, < 5.0) | 22 | actionpack (>= 4.0.0, < 5.0) |
15 | actionpack-page_caching (1.0.2) | 23 | actionpack-page_caching (1.0.2) |
16 | actionpack (>= 4.0.0, < 5) | 24 | actionpack (>= 4.0.0, < 5) |
17 | - activemodel (4.0.2) | ||
18 | - activesupport (= 4.0.2) | 25 | + activemodel (4.0.4) |
26 | + activesupport (= 4.0.4) | ||
19 | builder (~> 3.1.0) | 27 | builder (~> 3.1.0) |
20 | - activerecord (4.0.2) | ||
21 | - activemodel (= 4.0.2) | 28 | + activerecord (4.0.4) |
29 | + activemodel (= 4.0.4) | ||
22 | activerecord-deprecated_finders (~> 1.0.2) | 30 | activerecord-deprecated_finders (~> 1.0.2) |
23 | - activesupport (= 4.0.2) | 31 | + activesupport (= 4.0.4) |
24 | arel (~> 4.0.0) | 32 | arel (~> 4.0.0) |
25 | activerecord-deprecated_finders (1.0.3) | 33 | activerecord-deprecated_finders (1.0.3) |
26 | - activesupport (4.0.2) | ||
27 | - i18n (~> 0.6, >= 0.6.4) | 34 | + activesupport (4.0.4) |
35 | + i18n (~> 0.6, >= 0.6.9) | ||
28 | minitest (~> 4.2) | 36 | minitest (~> 4.2) |
29 | multi_json (~> 1.3) | 37 | multi_json (~> 1.3) |
30 | thread_safe (~> 0.1) | 38 | thread_safe (~> 0.1) |
31 | tzinfo (~> 0.3.37) | 39 | tzinfo (~> 0.3.37) |
32 | - acts-as-taggable-on (2.4.1) | ||
33 | - rails (>= 3, < 5) | ||
34 | - addressable (2.3.5) | ||
35 | - annotate (2.6.0) | 40 | + acts-as-taggable-on (3.1.0) |
41 | + actionpack (>= 3, < 5) | ||
42 | + activerecord (>= 3, < 5) | ||
43 | + activesupport (>= 3, < 5) | ||
44 | + addressable (2.3.6) | ||
45 | + annotate (2.6.2) | ||
36 | activerecord (>= 2.3.0) | 46 | activerecord (>= 2.3.0) |
37 | rake (>= 0.8.7) | 47 | rake (>= 0.8.7) |
38 | - arel (4.0.1) | 48 | + arel (4.0.2) |
39 | asciidoctor (0.1.4) | 49 | asciidoctor (0.1.4) |
40 | - atomic (1.1.14) | 50 | + atomic (1.1.16) |
41 | awesome_print (1.2.0) | 51 | awesome_print (1.2.0) |
42 | - axiom-types (0.0.5) | ||
43 | - descendants_tracker (~> 0.0.1) | ||
44 | - ice_nine (~> 0.9) | ||
45 | - bcrypt-ruby (3.1.2) | ||
46 | - better_errors (1.0.1) | 52 | + axiom-types (0.1.1) |
53 | + descendants_tracker (~> 0.0.4) | ||
54 | + ice_nine (~> 0.11.0) | ||
55 | + thread_safe (~> 0.3, >= 0.3.1) | ||
56 | + bcrypt (3.1.7) | ||
57 | + bcrypt-ruby (3.1.5) | ||
58 | + bcrypt (>= 3.1.3) | ||
59 | + better_errors (1.1.0) | ||
47 | coderay (>= 1.0.0) | 60 | coderay (>= 1.0.0) |
48 | erubis (>= 2.6.6) | 61 | erubis (>= 2.6.6) |
49 | binding_of_caller (0.7.2) | 62 | binding_of_caller (0.7.2) |
@@ -57,21 +70,25 @@ GEM | @@ -57,21 +70,25 @@ GEM | ||
57 | rack (>= 1.0.0) | 70 | rack (>= 1.0.0) |
58 | rack-test (>= 0.5.4) | 71 | rack-test (>= 0.5.4) |
59 | xpath (~> 2.0) | 72 | xpath (~> 2.0) |
60 | - carrierwave (0.9.0) | 73 | + carrierwave (0.10.0) |
61 | activemodel (>= 3.2.0) | 74 | activemodel (>= 3.2.0) |
62 | activesupport (>= 3.2.0) | 75 | activesupport (>= 3.2.0) |
63 | json (>= 1.7) | 76 | json (>= 1.7) |
77 | + mime-types (>= 1.16) | ||
64 | celluloid (0.15.2) | 78 | celluloid (0.15.2) |
65 | timers (~> 1.1.0) | 79 | timers (~> 1.1.0) |
80 | + celluloid-io (0.15.0) | ||
81 | + celluloid (>= 0.15.0) | ||
82 | + nio4r (>= 0.5.0) | ||
66 | charlock_holmes (0.6.9.4) | 83 | charlock_holmes (0.6.9.4) |
67 | chosen-rails (1.0.1) | 84 | chosen-rails (1.0.1) |
68 | coffee-rails (>= 3.2) | 85 | coffee-rails (>= 3.2) |
69 | compass-rails (>= 1.0) | 86 | compass-rails (>= 1.0) |
70 | railties (>= 3.0) | 87 | railties (>= 3.0) |
71 | sass-rails (>= 3.2) | 88 | sass-rails (>= 3.2) |
72 | - chunky_png (1.2.9) | 89 | + chunky_png (1.3.0) |
73 | cliver (0.2.2) | 90 | cliver (0.2.2) |
74 | - code_analyzer (0.4.3) | 91 | + code_analyzer (0.4.5) |
75 | sexp_processor | 92 | sexp_processor |
76 | coderay (1.1.0) | 93 | coderay (1.1.0) |
77 | coercible (1.0.0) | 94 | coercible (1.0.0) |
@@ -82,30 +99,32 @@ GEM | @@ -82,30 +99,32 @@ GEM | ||
82 | coffee-script (2.2.0) | 99 | coffee-script (2.2.0) |
83 | coffee-script-source | 100 | coffee-script-source |
84 | execjs | 101 | execjs |
85 | - coffee-script-source (1.6.3) | 102 | + coffee-script-source (1.7.0) |
86 | colored (1.2) | 103 | colored (1.2) |
87 | colorize (0.5.8) | 104 | colorize (0.5.8) |
88 | - compass (0.12.2) | 105 | + compass (0.12.4) |
89 | chunky_png (~> 1.2) | 106 | chunky_png (~> 1.2) |
90 | fssm (>= 0.2.7) | 107 | fssm (>= 0.2.7) |
91 | - sass (~> 3.1) | ||
92 | - compass-rails (1.1.1) | 108 | + sass (~> 3.2.17) |
109 | + compass-rails (1.1.7) | ||
93 | compass (>= 0.12.2) | 110 | compass (>= 0.12.2) |
94 | - connection_pool (1.2.0) | 111 | + sprockets (<= 2.11.0) |
112 | + connection_pool (2.0.0) | ||
95 | coveralls (0.7.0) | 113 | coveralls (0.7.0) |
96 | multi_json (~> 1.3) | 114 | multi_json (~> 1.3) |
97 | rest-client | 115 | rest-client |
98 | simplecov (>= 0.7) | 116 | simplecov (>= 0.7) |
99 | term-ansicolor | 117 | term-ansicolor |
100 | thor | 118 | thor |
101 | - crack (0.4.1) | ||
102 | - safe_yaml (~> 0.9.0) | 119 | + crack (0.4.2) |
120 | + safe_yaml (~> 1.0.0) | ||
103 | d3_rails (3.1.10) | 121 | d3_rails (3.1.10) |
104 | railties (>= 3.1.0) | 122 | railties (>= 3.1.0) |
105 | daemons (1.1.9) | 123 | daemons (1.1.9) |
106 | database_cleaner (1.2.0) | 124 | database_cleaner (1.2.0) |
107 | debug_inspector (0.0.2) | 125 | debug_inspector (0.0.2) |
108 | - descendants_tracker (0.0.3) | 126 | + descendants_tracker (0.0.4) |
127 | + thread_safe (~> 0.3, >= 0.3.1) | ||
109 | devise (3.0.4) | 128 | devise (3.0.4) |
110 | bcrypt-ruby (~> 3.0) | 129 | bcrypt-ruby (~> 3.0) |
111 | orm_adapter (~> 0.1) | 130 | orm_adapter (~> 0.1) |
@@ -114,29 +133,29 @@ GEM | @@ -114,29 +133,29 @@ GEM | ||
114 | devise-async (0.8.0) | 133 | devise-async (0.8.0) |
115 | devise (>= 2.2, < 3.2) | 134 | devise (>= 2.2, < 3.2) |
116 | diff-lcs (1.2.5) | 135 | diff-lcs (1.2.5) |
117 | - docile (1.1.1) | ||
118 | - dotenv (0.9.0) | 136 | + docile (1.1.3) |
137 | + dotenv (0.10.0) | ||
119 | email_spec (1.5.0) | 138 | email_spec (1.5.0) |
120 | launchy (~> 2.1) | 139 | launchy (~> 2.1) |
121 | mail (~> 2.2) | 140 | mail (~> 2.2) |
122 | - enumerize (0.7.0) | 141 | + enumerize (0.8.0) |
123 | activesupport (>= 3.2) | 142 | activesupport (>= 3.2) |
124 | - equalizer (0.0.8) | 143 | + equalizer (0.0.9) |
125 | erubis (2.7.0) | 144 | erubis (2.7.0) |
126 | escape_utils (0.2.4) | 145 | escape_utils (0.2.4) |
127 | eventmachine (1.0.3) | 146 | eventmachine (1.0.3) |
128 | excon (0.13.4) | 147 | excon (0.13.4) |
129 | execjs (2.0.2) | 148 | execjs (2.0.2) |
130 | - factory_girl (4.3.0) | 149 | + factory_girl (4.4.0) |
131 | activesupport (>= 3.0.0) | 150 | activesupport (>= 3.0.0) |
132 | - factory_girl_rails (4.3.0) | ||
133 | - factory_girl (~> 4.3.0) | 151 | + factory_girl_rails (4.4.1) |
152 | + factory_girl (~> 4.4.0) | ||
134 | railties (>= 3.0.0) | 153 | railties (>= 3.0.0) |
135 | - faraday (0.8.8) | 154 | + faraday (0.8.9) |
136 | multipart-post (~> 1.2.0) | 155 | multipart-post (~> 1.2.0) |
137 | faraday_middleware (0.9.0) | 156 | faraday_middleware (0.9.0) |
138 | faraday (>= 0.7.4, < 0.9) | 157 | faraday (>= 0.7.4, < 0.9) |
139 | - ffaker (1.22.1) | 158 | + ffaker (1.23.0) |
140 | ffi (1.9.3) | 159 | ffi (1.9.3) |
141 | fog (1.3.1) | 160 | fog (1.3.1) |
142 | builder | 161 | builder |
@@ -173,7 +192,7 @@ GEM | @@ -173,7 +192,7 @@ GEM | ||
173 | stringex (~> 1.5.1) | 192 | stringex (~> 1.5.1) |
174 | gitlab-grack (2.0.0.pre) | 193 | gitlab-grack (2.0.0.pre) |
175 | rack (~> 1.5.1) | 194 | rack (~> 1.5.1) |
176 | - gitlab-grit (2.6.3) | 195 | + gitlab-grit (2.6.4) |
177 | charlock_holmes (~> 0.6.9) | 196 | charlock_holmes (~> 0.6.9) |
178 | diff-lcs (~> 1.1) | 197 | diff-lcs (~> 1.1) |
179 | mime-types (~> 1.15) | 198 | mime-types (~> 1.15) |
@@ -186,7 +205,7 @@ GEM | @@ -186,7 +205,7 @@ GEM | ||
186 | gitlab-pygments.rb (0.5.4) | 205 | gitlab-pygments.rb (0.5.4) |
187 | posix-spawn (~> 0.3.6) | 206 | posix-spawn (~> 0.3.6) |
188 | yajl-ruby (~> 1.1.0) | 207 | yajl-ruby (~> 1.1.0) |
189 | - gitlab_git (4.0.0.pre) | 208 | + gitlab_git (4.0.0) |
190 | activesupport (~> 4.0.0) | 209 | activesupport (~> 4.0.0) |
191 | gitlab-grit (~> 2.6.1) | 210 | gitlab-grit (~> 2.6.1) |
192 | gitlab-linguist (~> 2.9.5) | 211 | gitlab-linguist (~> 2.9.5) |
@@ -197,7 +216,7 @@ GEM | @@ -197,7 +216,7 @@ GEM | ||
197 | omniauth (~> 1.0) | 216 | omniauth (~> 1.0) |
198 | pyu-ruby-sasl (~> 0.0.3.1) | 217 | pyu-ruby-sasl (~> 0.0.3.1) |
199 | rubyntlm (~> 0.1.1) | 218 | rubyntlm (~> 0.1.1) |
200 | - gon (5.0.0) | 219 | + gon (5.0.4) |
201 | actionpack (>= 2.3.0) | 220 | actionpack (>= 2.3.0) |
202 | json | 221 | json |
203 | grape (0.6.1) | 222 | grape (0.6.1) |
@@ -214,70 +233,71 @@ GEM | @@ -214,70 +233,71 @@ GEM | ||
214 | activesupport | 233 | activesupport |
215 | multi_json (>= 1.3.2) | 234 | multi_json (>= 1.3.2) |
216 | growl (1.0.3) | 235 | growl (1.0.3) |
217 | - guard (2.2.4) | 236 | + guard (2.6.0) |
218 | formatador (>= 0.2.4) | 237 | formatador (>= 0.2.4) |
219 | - listen (~> 2.1) | 238 | + listen (~> 2.7) |
220 | lumberjack (~> 1.0) | 239 | lumberjack (~> 1.0) |
221 | pry (>= 0.9.12) | 240 | pry (>= 0.9.12) |
222 | thor (>= 0.18.1) | 241 | thor (>= 0.18.1) |
223 | - guard-rspec (4.2.0) | ||
224 | - guard (>= 2.1.1) | 242 | + guard-rspec (4.2.8) |
243 | + guard (~> 2.1) | ||
225 | rspec (>= 2.14, < 4.0) | 244 | rspec (>= 2.14, < 4.0) |
226 | - guard-spinach (0.0.2) | 245 | + guard-spinach (0.0.3) |
227 | guard (>= 1.1) | 246 | guard (>= 1.1) |
228 | spinach | 247 | spinach |
229 | - haml (4.0.4) | 248 | + haml (4.0.5) |
230 | tilt | 249 | tilt |
231 | - haml-rails (0.5.1) | ||
232 | - actionpack (~> 4.0.0) | ||
233 | - activesupport (~> 4.0.0) | 250 | + haml-rails (0.5.3) |
251 | + actionpack (>= 4.0.1) | ||
252 | + activesupport (>= 4.0.1) | ||
234 | haml (>= 3.1, < 5.0) | 253 | haml (>= 3.1, < 5.0) |
235 | - railties (~> 4.0.0) | 254 | + railties (>= 4.0.1) |
236 | hashie (2.0.5) | 255 | hashie (2.0.5) |
237 | hike (1.2.3) | 256 | hike (1.2.3) |
238 | hipchat (0.9.0) | 257 | hipchat (0.9.0) |
239 | httparty | 258 | httparty |
240 | httparty | 259 | httparty |
241 | http_parser.rb (0.5.3) | 260 | http_parser.rb (0.5.3) |
242 | - httparty (0.12.0) | 261 | + httparty (0.13.0) |
243 | json (~> 1.8) | 262 | json (~> 1.8) |
244 | multi_xml (>= 0.5.2) | 263 | multi_xml (>= 0.5.2) |
245 | - httpauth (0.2.0) | 264 | + httpauth (0.2.1) |
246 | i18n (0.6.9) | 265 | i18n (0.6.9) |
247 | - ice_nine (0.10.0) | 266 | + ice_nine (0.11.0) |
248 | jasmine (2.0.0.rc5) | 267 | jasmine (2.0.0.rc5) |
249 | jasmine-core (~> 2.0.0.rc5) | 268 | jasmine-core (~> 2.0.0.rc5) |
250 | phantomjs | 269 | phantomjs |
251 | rack (>= 1.2.1) | 270 | rack (>= 1.2.1) |
252 | rake | 271 | rake |
253 | - jasmine-core (2.0.0.rc5) | 272 | + jasmine-core (2.0.0) |
254 | jquery-atwho-rails (0.3.3) | 273 | jquery-atwho-rails (0.3.3) |
255 | jquery-rails (2.1.3) | 274 | jquery-rails (2.1.3) |
256 | railties (>= 3.1.0, < 5.0) | 275 | railties (>= 3.1.0, < 5.0) |
257 | thor (~> 0.14) | 276 | thor (~> 0.14) |
258 | - jquery-turbolinks (2.0.1) | 277 | + jquery-turbolinks (2.0.2) |
259 | railties (>= 3.1.0) | 278 | railties (>= 3.1.0) |
260 | turbolinks | 279 | turbolinks |
261 | jquery-ui-rails (2.0.2) | 280 | jquery-ui-rails (2.0.2) |
262 | jquery-rails | 281 | jquery-rails |
263 | railties (>= 3.1.0) | 282 | railties (>= 3.1.0) |
264 | json (1.8.1) | 283 | json (1.8.1) |
265 | - jwt (0.1.8) | 284 | + jwt (0.1.11) |
266 | multi_json (>= 1.5) | 285 | multi_json (>= 1.5) |
267 | kaminari (0.14.1) | 286 | kaminari (0.14.1) |
268 | actionpack (>= 3.0.0) | 287 | actionpack (>= 3.0.0) |
269 | activesupport (>= 3.0.0) | 288 | activesupport (>= 3.0.0) |
270 | - kgio (2.8.1) | 289 | + kgio (2.9.2) |
271 | launchy (2.4.2) | 290 | launchy (2.4.2) |
272 | addressable (~> 2.3) | 291 | addressable (~> 2.3) |
273 | - letter_opener (1.1.2) | 292 | + letter_opener (1.2.0) |
274 | launchy (~> 2.2) | 293 | launchy (~> 2.2) |
275 | libv8 (3.16.14.3) | 294 | libv8 (3.16.14.3) |
276 | - listen (2.3.1) | 295 | + listen (2.7.1) |
277 | celluloid (>= 0.15.2) | 296 | celluloid (>= 0.15.2) |
297 | + celluloid-io (>= 0.15.0) | ||
278 | rb-fsevent (>= 0.9.3) | 298 | rb-fsevent (>= 0.9.3) |
279 | rb-inotify (>= 0.9) | 299 | rb-inotify (>= 0.9) |
280 | - lumberjack (1.0.4) | 300 | + lumberjack (1.0.5) |
281 | mail (2.5.4) | 301 | mail (2.5.4) |
282 | mime-types (~> 1.16) | 302 | mime-types (~> 1.16) |
283 | treetop (~> 1.4.8) | 303 | treetop (~> 1.4.8) |
@@ -286,15 +306,16 @@ GEM | @@ -286,15 +306,16 @@ GEM | ||
286 | minitest (4.7.5) | 306 | minitest (4.7.5) |
287 | modernizr (2.6.2) | 307 | modernizr (2.6.2) |
288 | sprockets (~> 2.0) | 308 | sprockets (~> 2.0) |
289 | - multi_json (1.8.2) | 309 | + multi_json (1.9.2) |
290 | multi_xml (0.5.5) | 310 | multi_xml (0.5.5) |
291 | multipart-post (1.2.0) | 311 | multipart-post (1.2.0) |
292 | - mysql2 (0.3.11) | 312 | + mysql2 (0.3.15) |
293 | net-ldap (0.3.1) | 313 | net-ldap (0.3.1) |
294 | net-scp (1.0.4) | 314 | net-scp (1.0.4) |
295 | net-ssh (>= 1.99.1) | 315 | net-ssh (>= 1.99.1) |
296 | - net-ssh (2.7.0) | ||
297 | - nokogiri (1.5.10) | 316 | + net-ssh (2.8.0) |
317 | + nio4r (1.0.0) | ||
318 | + nokogiri (1.5.11) | ||
298 | oauth (0.4.7) | 319 | oauth (0.4.7) |
299 | oauth2 (0.8.1) | 320 | oauth2 (0.8.1) |
300 | faraday (~> 0.8) | 321 | faraday (~> 0.8) |
@@ -308,7 +329,7 @@ GEM | @@ -308,7 +329,7 @@ GEM | ||
308 | omniauth-github (1.1.1) | 329 | omniauth-github (1.1.1) |
309 | omniauth (~> 1.0) | 330 | omniauth (~> 1.0) |
310 | omniauth-oauth2 (~> 1.1) | 331 | omniauth-oauth2 (~> 1.1) |
311 | - omniauth-google-oauth2 (0.2.1) | 332 | + omniauth-google-oauth2 (0.2.2) |
312 | omniauth (~> 1.0) | 333 | omniauth (~> 1.0) |
313 | omniauth-oauth2 | 334 | omniauth-oauth2 |
314 | omniauth-oauth (1.0.1) | 335 | omniauth-oauth (1.0.1) |
@@ -321,50 +342,50 @@ GEM | @@ -321,50 +342,50 @@ GEM | ||
321 | multi_json (~> 1.3) | 342 | multi_json (~> 1.3) |
322 | omniauth-oauth (~> 1.0) | 343 | omniauth-oauth (~> 1.0) |
323 | orm_adapter (0.5.0) | 344 | orm_adapter (0.5.0) |
324 | - pg (0.15.1) | ||
325 | - phantomjs (1.9.2.0) | 345 | + pg (0.17.1) |
346 | + phantomjs (1.9.7.0) | ||
326 | poltergeist (1.4.1) | 347 | poltergeist (1.4.1) |
327 | capybara (~> 2.1.0) | 348 | capybara (~> 2.1.0) |
328 | cliver (~> 0.2.1) | 349 | cliver (~> 0.2.1) |
329 | multi_json (~> 1.0) | 350 | multi_json (~> 1.0) |
330 | websocket-driver (>= 0.2.0) | 351 | websocket-driver (>= 0.2.0) |
331 | - polyglot (0.3.3) | ||
332 | - posix-spawn (0.3.6) | ||
333 | - protected_attributes (1.0.5) | 352 | + polyglot (0.3.4) |
353 | + posix-spawn (0.3.8) | ||
354 | + protected_attributes (1.0.7) | ||
334 | activemodel (>= 4.0.1, < 5.0) | 355 | activemodel (>= 4.0.1, < 5.0) |
335 | - pry (0.9.12.4) | 356 | + pry (0.9.12.6) |
336 | coderay (~> 1.0) | 357 | coderay (~> 1.0) |
337 | method_source (~> 0.8) | 358 | method_source (~> 0.8) |
338 | slop (~> 3.4) | 359 | slop (~> 3.4) |
339 | pyu-ruby-sasl (0.0.3.3) | 360 | pyu-ruby-sasl (0.0.3.3) |
340 | quiet_assets (1.0.2) | 361 | quiet_assets (1.0.2) |
341 | railties (>= 3.1, < 5.0) | 362 | railties (>= 3.1, < 5.0) |
342 | - racc (1.4.10) | 363 | + racc (1.4.11) |
343 | rack (1.5.2) | 364 | rack (1.5.2) |
344 | rack-accept (0.4.5) | 365 | rack-accept (0.4.5) |
345 | rack (>= 0.4) | 366 | rack (>= 0.4) |
346 | - rack-attack (2.3.0) | 367 | + rack-attack (3.0.0) |
347 | rack | 368 | rack |
348 | rack-cors (0.2.9) | 369 | rack-cors (0.2.9) |
349 | - rack-mini-profiler (0.1.31) | 370 | + rack-mini-profiler (0.9.1) |
350 | rack (>= 1.1.3) | 371 | rack (>= 1.1.3) |
351 | rack-mount (0.8.3) | 372 | rack-mount (0.8.3) |
352 | rack (>= 1.0.0) | 373 | rack (>= 1.0.0) |
353 | - rack-protection (1.5.1) | 374 | + rack-protection (1.5.2) |
354 | rack | 375 | rack |
355 | rack-test (0.6.2) | 376 | rack-test (0.6.2) |
356 | rack (>= 1.0) | 377 | rack (>= 1.0) |
357 | - rails (4.0.2) | ||
358 | - actionmailer (= 4.0.2) | ||
359 | - actionpack (= 4.0.2) | ||
360 | - activerecord (= 4.0.2) | ||
361 | - activesupport (= 4.0.2) | 378 | + rails (4.0.4) |
379 | + actionmailer (= 4.0.4) | ||
380 | + actionpack (= 4.0.4) | ||
381 | + activerecord (= 4.0.4) | ||
382 | + activesupport (= 4.0.4) | ||
362 | bundler (>= 1.3.0, < 2.0) | 383 | bundler (>= 1.3.0, < 2.0) |
363 | - railties (= 4.0.2) | 384 | + railties (= 4.0.4) |
364 | sprockets-rails (~> 2.0.0) | 385 | sprockets-rails (~> 2.0.0) |
365 | rails-observers (0.1.2) | 386 | rails-observers (0.1.2) |
366 | activemodel (~> 4.0) | 387 | activemodel (~> 4.0) |
367 | - rails_best_practices (1.14.4) | 388 | + rails_best_practices (1.15.2) |
368 | activesupport | 389 | activesupport |
369 | awesome_print | 390 | awesome_print |
370 | code_analyzer (>= 0.4.3) | 391 | code_analyzer (>= 0.4.3) |
@@ -373,21 +394,21 @@ GEM | @@ -373,21 +394,21 @@ GEM | ||
373 | i18n | 394 | i18n |
374 | require_all | 395 | require_all |
375 | ruby-progressbar | 396 | ruby-progressbar |
376 | - railties (4.0.2) | ||
377 | - actionpack (= 4.0.2) | ||
378 | - activesupport (= 4.0.2) | 397 | + railties (4.0.4) |
398 | + actionpack (= 4.0.4) | ||
399 | + activesupport (= 4.0.4) | ||
379 | rake (>= 0.8.7) | 400 | rake (>= 0.8.7) |
380 | thor (>= 0.18.1, < 2.0) | 401 | thor (>= 0.18.1, < 2.0) |
381 | - raindrops (0.12.0) | ||
382 | - rake (10.1.0) | 402 | + raindrops (0.13.0) |
403 | + rake (10.2.2) | ||
383 | raphael-rails (2.1.2) | 404 | raphael-rails (2.1.2) |
384 | - rb-fsevent (0.9.3) | ||
385 | - rb-inotify (0.9.2) | 405 | + rb-fsevent (0.9.4) |
406 | + rb-inotify (0.9.3) | ||
386 | ffi (>= 0.5.0) | 407 | ffi (>= 0.5.0) |
387 | - rdoc (3.12.2) | 408 | + rdoc (4.1.1) |
388 | json (~> 1.4) | 409 | json (~> 1.4) |
389 | redcarpet (2.2.2) | 410 | redcarpet (2.2.2) |
390 | - redis (3.0.6) | 411 | + redis (3.0.7) |
391 | redis-actionpack (4.0.0) | 412 | redis-actionpack (4.0.0) |
392 | actionpack (~> 4) | 413 | actionpack (~> 4) |
393 | redis-rack (~> 1.5.0) | 414 | redis-rack (~> 1.5.0) |
@@ -414,45 +435,47 @@ GEM | @@ -414,45 +435,47 @@ GEM | ||
414 | rspec-core (~> 2.14.0) | 435 | rspec-core (~> 2.14.0) |
415 | rspec-expectations (~> 2.14.0) | 436 | rspec-expectations (~> 2.14.0) |
416 | rspec-mocks (~> 2.14.0) | 437 | rspec-mocks (~> 2.14.0) |
417 | - rspec-core (2.14.7) | ||
418 | - rspec-expectations (2.14.4) | 438 | + rspec-core (2.14.8) |
439 | + rspec-expectations (2.14.5) | ||
419 | diff-lcs (>= 1.1.3, < 2.0) | 440 | diff-lcs (>= 1.1.3, < 2.0) |
420 | - rspec-mocks (2.14.4) | ||
421 | - rspec-rails (2.14.0) | 441 | + rspec-mocks (2.14.6) |
442 | + rspec-rails (2.14.2) | ||
422 | actionpack (>= 3.0) | 443 | actionpack (>= 3.0) |
444 | + activemodel (>= 3.0) | ||
423 | activesupport (>= 3.0) | 445 | activesupport (>= 3.0) |
424 | railties (>= 3.0) | 446 | railties (>= 3.0) |
425 | rspec-core (~> 2.14.0) | 447 | rspec-core (~> 2.14.0) |
426 | rspec-expectations (~> 2.14.0) | 448 | rspec-expectations (~> 2.14.0) |
427 | rspec-mocks (~> 2.14.0) | 449 | rspec-mocks (~> 2.14.0) |
428 | ruby-hmac (0.4.0) | 450 | ruby-hmac (0.4.0) |
429 | - ruby-progressbar (1.2.0) | 451 | + ruby-progressbar (1.4.2) |
430 | rubyntlm (0.1.1) | 452 | rubyntlm (0.1.1) |
431 | - safe_yaml (0.9.7) | 453 | + safe_yaml (1.0.1) |
432 | sanitize (2.0.6) | 454 | sanitize (2.0.6) |
433 | nokogiri (>= 1.4.4) | 455 | nokogiri (>= 1.4.4) |
434 | - sass (3.2.12) | ||
435 | - sass-rails (4.0.1) | 456 | + sass (3.2.18) |
457 | + sass-rails (4.0.2) | ||
436 | railties (>= 4.0.0, < 5.0) | 458 | railties (>= 4.0.0, < 5.0) |
437 | - sass (>= 3.1.10) | 459 | + sass (~> 3.2.0) |
460 | + sprockets (~> 2.8, <= 2.11.0) | ||
438 | sprockets-rails (~> 2.0.0) | 461 | sprockets-rails (~> 2.0.0) |
439 | - sdoc (0.3.20) | ||
440 | - json (>= 1.1.3) | ||
441 | - rdoc (~> 3.10) | 462 | + sdoc (0.4.0) |
463 | + json (~> 1.8) | ||
464 | + rdoc (~> 4.0, < 5.0) | ||
442 | seed-fu (2.3.0) | 465 | seed-fu (2.3.0) |
443 | activerecord (>= 3.1, < 4.1) | 466 | activerecord (>= 3.1, < 4.1) |
444 | activesupport (>= 3.1, < 4.1) | 467 | activesupport (>= 3.1, < 4.1) |
445 | - select2-rails (3.5.2) | 468 | + select2-rails (3.5.4) |
446 | thor (~> 0.14) | 469 | thor (~> 0.14) |
447 | settingslogic (2.0.9) | 470 | settingslogic (2.0.9) |
448 | - sexp_processor (4.4.0) | 471 | + sexp_processor (4.4.3) |
449 | shoulda-matchers (2.1.0) | 472 | shoulda-matchers (2.1.0) |
450 | activesupport (>= 3.0.0) | 473 | activesupport (>= 3.0.0) |
451 | - sidekiq (2.17.0) | 474 | + sidekiq (3.0.0) |
452 | celluloid (>= 0.15.2) | 475 | celluloid (>= 0.15.2) |
453 | - connection_pool (>= 1.0.0) | 476 | + connection_pool (>= 2.0.0) |
454 | json | 477 | json |
455 | - redis (>= 3.0.4) | 478 | + redis (>= 3.0.6) |
456 | redis-namespace (>= 1.3.1) | 479 | redis-namespace (>= 1.3.1) |
457 | simple_oauth (0.1.9) | 480 | simple_oauth (0.1.9) |
458 | simplecov (0.8.2) | 481 | simplecov (0.8.2) |
@@ -468,7 +491,7 @@ GEM | @@ -468,7 +491,7 @@ GEM | ||
468 | slim (2.0.2) | 491 | slim (2.0.2) |
469 | temple (~> 0.6.6) | 492 | temple (~> 0.6.6) |
470 | tilt (>= 1.3.3, < 2.1) | 493 | tilt (>= 1.3.3, < 2.1) |
471 | - slop (3.4.7) | 494 | + slop (3.5.0) |
472 | spinach (0.8.7) | 495 | spinach (0.8.7) |
473 | colorize (= 0.5.8) | 496 | colorize (= 0.5.8) |
474 | gherkin-ruby (>= 0.3.1) | 497 | gherkin-ruby (>= 0.3.1) |
@@ -477,7 +500,7 @@ GEM | @@ -477,7 +500,7 @@ GEM | ||
477 | railties (>= 3) | 500 | railties (>= 3) |
478 | spinach (>= 0.4) | 501 | spinach (>= 0.4) |
479 | spork (1.0.0rc4) | 502 | spork (1.0.0rc4) |
480 | - sprockets (2.10.1) | 503 | + sprockets (2.11.0) |
481 | hike (~> 1.2) | 504 | hike (~> 1.2) |
482 | multi_json (~> 1.0) | 505 | multi_json (~> 1.0) |
483 | rack (~> 1.0) | 506 | rack (~> 1.0) |
@@ -490,42 +513,42 @@ GEM | @@ -490,42 +513,42 @@ GEM | ||
490 | state_machine (1.2.0) | 513 | state_machine (1.2.0) |
491 | stringex (1.5.1) | 514 | stringex (1.5.1) |
492 | temple (0.6.7) | 515 | temple (0.6.7) |
493 | - term-ansicolor (1.2.2) | ||
494 | - tins (~> 0.8) | ||
495 | - test_after_commit (0.2.2) | ||
496 | - therubyracer (0.12.0) | 516 | + term-ansicolor (1.3.0) |
517 | + tins (~> 1.0) | ||
518 | + test_after_commit (0.2.3) | ||
519 | + therubyracer (0.12.1) | ||
497 | libv8 (~> 3.16.14.0) | 520 | libv8 (~> 3.16.14.0) |
498 | ref | 521 | ref |
499 | - thin (1.6.1) | 522 | + thin (1.6.2) |
500 | daemons (>= 1.0.9) | 523 | daemons (>= 1.0.9) |
501 | eventmachine (>= 1.0.0) | 524 | eventmachine (>= 1.0.0) |
502 | rack (>= 1.0.0) | 525 | rack (>= 1.0.0) |
503 | - thor (0.18.1) | ||
504 | - thread_safe (0.1.3) | ||
505 | - atomic | 526 | + thor (0.19.1) |
527 | + thread_safe (0.3.1) | ||
528 | + atomic (>= 1.1.7, < 2) | ||
506 | tilt (1.4.1) | 529 | tilt (1.4.1) |
507 | timers (1.1.0) | 530 | timers (1.1.0) |
508 | - tinder (1.9.3) | 531 | + tinder (1.9.4) |
509 | eventmachine (~> 1.0) | 532 | eventmachine (~> 1.0) |
510 | - faraday (~> 0.8) | 533 | + faraday (~> 0.8.9) |
511 | faraday_middleware (~> 0.9) | 534 | faraday_middleware (~> 0.9) |
512 | hashie (>= 1.0, < 3) | 535 | hashie (>= 1.0, < 3) |
513 | json (~> 1.8.0) | 536 | json (~> 1.8.0) |
514 | mime-types (~> 1.19) | 537 | mime-types (~> 1.19) |
515 | multi_json (~> 1.7) | 538 | multi_json (~> 1.7) |
516 | twitter-stream (~> 0.1) | 539 | twitter-stream (~> 0.1) |
517 | - tins (0.13.1) | 540 | + tins (1.0.1) |
518 | treetop (1.4.15) | 541 | treetop (1.4.15) |
519 | polyglot | 542 | polyglot |
520 | polyglot (>= 0.3.1) | 543 | polyglot (>= 0.3.1) |
521 | - turbolinks (2.0.0) | 544 | + turbolinks (2.2.1) |
522 | coffee-rails | 545 | coffee-rails |
523 | twitter-stream (0.1.16) | 546 | twitter-stream (0.1.16) |
524 | eventmachine (>= 0.12.8) | 547 | eventmachine (>= 0.12.8) |
525 | http_parser.rb (~> 0.5.1) | 548 | http_parser.rb (~> 0.5.1) |
526 | simple_oauth (~> 0.1.4) | 549 | simple_oauth (~> 0.1.4) |
527 | - tzinfo (0.3.38) | ||
528 | - uglifier (2.3.2) | 550 | + tzinfo (0.3.39) |
551 | + uglifier (2.5.0) | ||
529 | execjs (>= 0.3.0) | 552 | execjs (>= 0.3.0) |
530 | json (>= 1.8.0) | 553 | json (>= 1.8.0) |
531 | underscore-rails (1.4.4) | 554 | underscore-rails (1.4.4) |
@@ -535,17 +558,17 @@ GEM | @@ -535,17 +558,17 @@ GEM | ||
535 | raindrops (~> 0.7) | 558 | raindrops (~> 0.7) |
536 | unicorn-worker-killer (0.4.2) | 559 | unicorn-worker-killer (0.4.2) |
537 | unicorn (~> 4) | 560 | unicorn (~> 4) |
538 | - virtus (1.0.1) | ||
539 | - axiom-types (~> 0.0.5) | 561 | + virtus (1.0.2) |
562 | + axiom-types (~> 0.1) | ||
540 | coercible (~> 1.0) | 563 | coercible (~> 1.0) |
541 | - descendants_tracker (~> 0.0.1) | ||
542 | - equalizer (~> 0.0.7) | 564 | + descendants_tracker (~> 0.0.3) |
565 | + equalizer (~> 0.0.9) | ||
543 | warden (1.2.3) | 566 | warden (1.2.3) |
544 | rack (>= 1.0) | 567 | rack (>= 1.0) |
545 | - webmock (1.16.0) | 568 | + webmock (1.17.4) |
546 | addressable (>= 2.2.7) | 569 | addressable (>= 2.2.7) |
547 | crack (>= 0.3.2) | 570 | crack (>= 0.3.2) |
548 | - websocket-driver (0.3.1) | 571 | + websocket-driver (0.3.2) |
549 | xpath (2.0.0) | 572 | xpath (2.0.0) |
550 | nokogiri (~> 1.3) | 573 | nokogiri (~> 1.3) |
551 | yajl-ruby (1.1.0) | 574 | yajl-ruby (1.1.0) |
@@ -612,6 +635,7 @@ DEPENDENCIES | @@ -612,6 +635,7 @@ DEPENDENCIES | ||
612 | modernizr (= 2.6.2) | 635 | modernizr (= 2.6.2) |
613 | mysql2 | 636 | mysql2 |
614 | omniauth (~> 1.1.3) | 637 | omniauth (~> 1.1.3) |
638 | + omniauth-env! | ||
615 | omniauth-github | 639 | omniauth-github |
616 | omniauth-google-oauth2 | 640 | omniauth-google-oauth2 |
617 | omniauth-twitter | 641 | omniauth-twitter |
app/controllers/omniauth_callbacks_controller.rb
@@ -23,6 +23,10 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController | @@ -23,6 +23,10 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
23 | sign_in_and_redirect(@user) | 23 | sign_in_and_redirect(@user) |
24 | end | 24 | end |
25 | 25 | ||
26 | + def env | ||
27 | + handle_omniauth | ||
28 | + end | ||
29 | + | ||
26 | private | 30 | private |
27 | 31 | ||
28 | def handle_omniauth | 32 | def handle_omniauth |
app/helpers/oauth_helper.rb
@@ -11,6 +11,10 @@ module OauthHelper | @@ -11,6 +11,10 @@ module OauthHelper | ||
11 | Devise.omniauth_providers | 11 | Devise.omniauth_providers |
12 | end | 12 | end |
13 | 13 | ||
14 | + def env_enabled? | ||
15 | + Devise.omniauth_providers.include?(:env) | ||
16 | + end | ||
17 | + | ||
14 | def enabled_social_providers | 18 | def enabled_social_providers |
15 | enabled_oauth_providers.select do |name| | 19 | enabled_oauth_providers.select do |name| |
16 | [:twitter, :github, :google_oauth2].include?(name.to_sym) | 20 | [:twitter, :github, :google_oauth2].include?(name.to_sym) |
app/views/devise/sessions/new.html.haml
config/gitlab.yml.example
@@ -129,17 +129,24 @@ production: &base | @@ -129,17 +129,24 @@ production: &base | ||
129 | password: '_the_password_of_the_bind_user' | 129 | password: '_the_password_of_the_bind_user' |
130 | allow_username_or_email_login: true | 130 | allow_username_or_email_login: true |
131 | 131 | ||
132 | + env: | ||
133 | + enabled: true | ||
134 | + database_name: 'colab' | ||
135 | + host: 'localhost' | ||
136 | + user: 'colab' | ||
137 | + password: 'colab' | ||
138 | + | ||
132 | ## OmniAuth settings | 139 | ## OmniAuth settings |
133 | omniauth: | 140 | omniauth: |
134 | # Allow login via Twitter, Google, etc. using OmniAuth providers | 141 | # Allow login via Twitter, Google, etc. using OmniAuth providers |
135 | - enabled: false | 142 | + enabled: true |
136 | 143 | ||
137 | # CAUTION! | 144 | # CAUTION! |
138 | # This allows users to login without having a user account first (default: false). | 145 | # This allows users to login without having a user account first (default: false). |
139 | # User accounts will be created automatically when authentication was successful. | 146 | # User accounts will be created automatically when authentication was successful. |
140 | - allow_single_sign_on: false | 147 | + allow_single_sign_on: true |
141 | # Locks down those users until they have been cleared by the admin (default: true). | 148 | # Locks down those users until they have been cleared by the admin (default: true). |
142 | - block_auto_created_users: true | 149 | + block_auto_created_users: false |
143 | 150 | ||
144 | ## Auth providers | 151 | ## Auth providers |
145 | # Uncomment the following lines and fill in the data of the auth provider you want to use | 152 | # Uncomment the following lines and fill in the data of the auth provider you want to use |
config/initializers/1_settings.rb
@@ -67,6 +67,9 @@ Settings['omniauth'] ||= Settingslogic.new({}) | @@ -67,6 +67,9 @@ Settings['omniauth'] ||= Settingslogic.new({}) | ||
67 | Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil? | 67 | Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil? |
68 | Settings.omniauth['providers'] ||= [] | 68 | Settings.omniauth['providers'] ||= [] |
69 | 69 | ||
70 | +Settings['env'] ||= Settingslogic.new({}) | ||
71 | +Settings.env['enabled'] = false if Settings.env['enabled'].nil? | ||
72 | + | ||
70 | Settings['issues_tracker'] ||= {} | 73 | Settings['issues_tracker'] ||= {} |
71 | 74 | ||
72 | # | 75 | # |
config/initializers/devise.rb
@@ -208,22 +208,25 @@ Devise.setup do |config| | @@ -208,22 +208,25 @@ Devise.setup do |config| | ||
208 | # manager.default_strategies(scope: :user).unshift :some_external_strategy | 208 | # manager.default_strategies(scope: :user).unshift :some_external_strategy |
209 | # end | 209 | # end |
210 | 210 | ||
211 | + ldap_configs = { | ||
212 | + host: Gitlab.config.ldap['host'], | ||
213 | + base: Gitlab.config.ldap['base'], | ||
214 | + uid: Gitlab.config.ldap['uid'], | ||
215 | + port: Gitlab.config.ldap['port'], | ||
216 | + method: Gitlab.config.ldap['method'], | ||
217 | + bind_dn: Gitlab.config.ldap['bind_dn'], | ||
218 | + password: Gitlab.config.ldap['password'] | ||
219 | + } | ||
220 | + | ||
211 | if Gitlab.config.ldap.enabled | 221 | if Gitlab.config.ldap.enabled |
212 | if Gitlab.config.ldap.allow_username_or_email_login | 222 | if Gitlab.config.ldap.allow_username_or_email_login |
213 | email_stripping_proc = ->(name) {name.gsub(/@.*$/,'')} | 223 | email_stripping_proc = ->(name) {name.gsub(/@.*$/,'')} |
214 | else | 224 | else |
215 | email_stripping_proc = ->(name) {name} | 225 | email_stripping_proc = ->(name) {name} |
216 | end | 226 | end |
217 | - | ||
218 | - config.omniauth :ldap, | ||
219 | - host: Gitlab.config.ldap['host'], | ||
220 | - base: Gitlab.config.ldap['base'], | ||
221 | - uid: Gitlab.config.ldap['uid'], | ||
222 | - port: Gitlab.config.ldap['port'], | ||
223 | - method: Gitlab.config.ldap['method'], | ||
224 | - bind_dn: Gitlab.config.ldap['bind_dn'], | ||
225 | - password: Gitlab.config.ldap['password'], | ||
226 | - name_proc: email_stripping_proc | 227 | + |
228 | + ldap_configs[:name_proc] = email_stripping_proc | ||
229 | + config.omniauth :ldap, ldap_configs | ||
227 | end | 230 | end |
228 | 231 | ||
229 | Gitlab.config.omniauth.providers.each do |provider| | 232 | Gitlab.config.omniauth.providers.each do |provider| |
@@ -238,4 +241,5 @@ Devise.setup do |config| | @@ -238,4 +241,5 @@ Devise.setup do |config| | ||
238 | config.omniauth provider['name'].to_sym, provider['app_id'], provider['app_secret'] | 241 | config.omniauth provider['name'].to_sym, provider['app_id'], provider['app_secret'] |
239 | end | 242 | end |
240 | end | 243 | end |
244 | + config.omniauth :env, ldap_configs if Gitlab.config.env.enabled | ||
241 | end | 245 | end |
lib/gitlab/backend/grack_auth.rb
@@ -57,6 +57,13 @@ module Grack | @@ -57,6 +57,13 @@ module Grack | ||
57 | return unauthorized | 57 | return unauthorized |
58 | end | 58 | end |
59 | 59 | ||
60 | + elsif Gitlab.config.env.enabled | ||
61 | + return unauthorized unless @env['HTTP_REMOTE_USER'] | ||
62 | + @user = User.find_by_provider_and_extern_uid('env', @env['HTTP_REMOTE_USER']) | ||
63 | + return unauthorized unless @user | ||
64 | + Gitlab::ShellEnv.set_env(@user) | ||
65 | + @env['REMOTE_USER'] = @env['HTTP_REMOTE_USER'] | ||
66 | + | ||
60 | else | 67 | else |
61 | return unauthorized unless project.public? | 68 | return unauthorized unless project.public? |
62 | end | 69 | end |