OSDN Git Service

Rewording for the account being blocked
authorTanguy Herrmann <dolanor@gmail.com>
Sat, 24 Nov 2012 17:04:42 +0000 (18:04 +0100)
committerTanguy Herrmann <dolanor@gmail.com>
Sat, 24 Nov 2012 17:21:57 +0000 (18:21 +0100)
When signing in with SSO, if the default behaviour of gitlab is to block SSO user, the only message the people will get is 'Your account was blocked'

They should get the idea this might be only temporary and not because of a technical problem

app/controllers/application_controller.rb

index ef6fc81..4b3623a 100644 (file)
@@ -34,7 +34,7 @@ class ApplicationController < ActionController::Base
   def reject_blocked!
     if current_user && current_user.blocked
       sign_out current_user
-      flash[:alert] = "Your account was blocked"
+      flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
       redirect_to new_user_session_path
     end
   end
@@ -42,7 +42,7 @@ class ApplicationController < ActionController::Base
   def after_sign_in_path_for resource
     if resource.is_a?(User) && resource.respond_to?(:blocked) && resource.blocked
       sign_out resource
-      flash[:alert] = "Your account was blocked"
+      flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
       new_user_session_path
     else
       super