diff --git a/ee/app/controllers/omniauth_kerberos_spnego_controller.rb b/ee/app/controllers/omniauth_kerberos_spnego_controller.rb
index 5a1671bfd91c6ae9cd37eb2546672b3067f5f318..b5e286221078b0ba76c164ceb9b906d1b8bcfc60 100644
--- a/ee/app/controllers/omniauth_kerberos_spnego_controller.rb
+++ b/ee/app/controllers/omniauth_kerberos_spnego_controller.rb
@@ -26,6 +26,9 @@ def negotiate
     # when the browser has given up.
     #
     headers['Www-Authenticate'] = spnego_challenge
-    render 'errors/kerberos_denied.html.haml', layout: 'errors', status: :unauthorized
+    render template: 'errors/kerberos_denied',
+           formats: :html,
+           locals: { layout: 'errors' },
+           status: :unauthorized
   end
 end