Browse files

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

  • Loading branch information...
1 parent f8799a2 commit ac06fa39bee5b490d253f11fb55dabfa20bc1a38 @danielsdeleo committed Apr 26, 2010
Showing with 5 additions and 7 deletions.
  1. +1 −7 chef-server-api/app/controllers/application.rb
  2. +4 −0 chef-server-api/config/init.rb
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

0 comments on commit ac06fa3

Please sign in to comment.