Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[CHEF-1072] cleanup code from pre-API-ification

  • Loading branch information...
commit ac06fa39bee5b490d253f11fb55dabfa20bc1a38 1 parent f8799a2
@danielsdeleo authored
View
8 chef-server-api/app/controllers/application.rb
@@ -82,13 +82,7 @@ def redirect_back_or_default(default)
end
def access_denied
- case content_type
- when :html
- store_location
- redirect slice_url(:openid_consumer), :message => { :error => "You don't have access to that, please login."}
- else
- raise Unauthorized, "You must authenticate first!"
- end
+ raise Unauthorized, "You must authenticate first!"
end
# Load a cookbook and return a hash with a list of all the files of a
View
4 chef-server-api/config/init.rb
@@ -24,6 +24,7 @@
require 'merb-assets'
require 'merb-helpers'
require 'merb-param-protection'
+require 'merb-haml'
require 'bunny'
require 'uuidtools'
@@ -44,6 +45,9 @@
Mixlib::Authentication::Log.logger = Ohai::Log.logger = Chef::Log.logger
+# Only used for the error page when visiting with a browser...
+use_template_engine :haml
+
Merb::Config.use do |c|
c[:session_id_key] = '_chef_server_session_id'
c[:session_secret_key] = Chef::Config.manage_secret_key
Please sign in to comment.
Something went wrong with that request. Please try again.