3604: Do not check for notifications if user is not even activated.
authorTom Clegg <tom@curoverse.com>
Sun, 17 Aug 2014 18:02:19 +0000 (14:02 -0400)
committerTom Clegg <tom@curoverse.com>
Sun, 17 Aug 2014 18:02:19 +0000 (14:02 -0400)
apps/workbench/app/controllers/application_controller.rb

index 8883e820aae4bcf925c2f55d7d63169bdd191cbb..de0e3438d42f5b39a4fd617eb2be742c8093e162 100644 (file)
@@ -589,15 +589,6 @@ class ApplicationController < ActionController::Base
     }
   }
 
-  #@@notification_tests.push lambda { |controller, current_user|
-  #  Job.limit(1).where(created_by: current_user.uuid).each do
-  #    return nil
-  #  end
-  #  return lambda { |view|
-  #    view.render partial: 'notifications/jobs_notification'
-  #  }
-  #}
-
   @@notification_tests.push lambda { |controller, current_user|
     Collection.limit(1).where(created_by: current_user.uuid).each do
       return nil
@@ -622,7 +613,7 @@ class ApplicationController < ActionController::Base
     @notification_count = 0
     @notifications = []
 
-    if current_user
+    if current_user.andand.is_active
       @showallalerts = false
       @@notification_tests.each do |t|
         a = t.call(self, current_user)