Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

let moderators in when locked

  • Loading branch information...
commit d502200dd20adf3e1e07deffc8c68ed181dac494 1 parent 69306f1
Jonas Schneider authored

Showing 1 changed file with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. +7 8 app/auth.rb
15 app/auth.rb
@@ -70,10 +70,13 @@ def authenticate_with_info!(info)
70 70 unless user.name
71 71 user.name = info.name
72 72 end
73   -
  73 +
74 74 user.save!
75   -
76   - warden.set_user user
  75 +
  76 + if !Instabil.locked? || user.moderator?
  77 + warden.set_user user
  78 + end
  79 +
77 80 redirect "/"
78 81 end
79 82
@@ -84,11 +87,7 @@ def authenticate_with_info!(info)
84 87 end
85 88
86 89 get '/auth/fichteid/callback' do
87   - if Instabil.locked?
88   - redirect '/'
89   - else
90   - authenticate_with_info! env['omniauth.auth'].info
91   - end
  90 + authenticate_with_info! env['omniauth.auth'].info
92 91 end
93 92
94 93 get '/logout' do

0 comments on commit d502200

Please sign in to comment.
Something went wrong with that request. Please try again.