diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-22 00:17:23 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-03-06 17:41:25 +0300 |
commit | 2ff139ddee49dca7109b9f547e54c6e472c7195b (patch) | |
tree | 101b2d8553f311dc4eab9ca54c374e68ec48b3a0 /config/initializers/warden.rb | |
parent | 0ef8a643489ad1a3da4431155326f0a6e206d870 (diff) |
Make Warden set_user hook validate user ip uniquness
+ rename shared context
Diffstat (limited to 'config/initializers/warden.rb')
-rw-r--r-- | config/initializers/warden.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb new file mode 100644 index 00000000000..3d83fb92d56 --- /dev/null +++ b/config/initializers/warden.rb @@ -0,0 +1,5 @@ +Rails.application.configure do |config| + Warden::Manager.after_set_user do |user, auth, opts| + Gitlab::Auth::UniqueIpsLimiter.limit_user!(user) + end +end |