Hi Jan-Simon, in general it looks like discussed. So please go ahead. I saw that it currently breaks the api test suite at three places, I suppose you will take care of that. Am Donnerstag, 28. Oktober 2010, 13:13:52 schrieb dl9pf@gmx.de: ..
--- a/src/api/app/controllers/application_controller.rb +++ b/src/api/app/controllers/application_controller.rb ... @@ -373,6 +379,10 @@ class ApplicationController < ActionController::Base render_error :message => "error saving package: #{exception.message}", :errorcode => "package_save_error", :status => 400 when DbProject::SaveError render_error :message => "error saving project: #{exception.message}", :errorcode => "project_save_error", :status => 400 + when DbProject::PrjAccessError + logger.error "PrjAccessError: #{exception.message}" + # do something with it. + return
I would like to see the default "Unknown Project" error message here as well. Same string used by both exceptions by default. ...
--- a/src/api/app/controllers/source_controller.rb +++ b/src/api/app/controllers/source_controller.rb @@ -3,8 +3,9 @@ require "rexml/document" class SourceController < ApplicationController validate_action :index => :directory, :packagelist => :directory, :filelist => :directory validate_action :project_meta => :project, :package_meta => :package, :pattern_meta => :pattern - - skip_before_filter :extract_user, :only => [:file, :project_meta] + + # is this still needed ?? would prohibit user extraction for usage in DbProject + #skip_before_filter :extract_user, :only => [:file, :project_meta]
Yes, this looks fishy. I suppose it came in due to /public controller, but ...
diff --git a/src/api/app/controllers/status_controller.rb b/src/api/app/controllers/status_controller.rb index a4cb31c..2aa38e2 100644 --- a/src/api/app/controllers/status_controller.rb +++ b/src/api/app/controllers/status_controller.rb @@ -1,8 +1,9 @@ require 'project_status_helper'
class StatusController < ApplicationController - - skip_before_filter :extract_user, :only => [ :history, :project ] + + # do we really need this ?? we should fall-back to anonymous user and don't have to skip. + #skip_before_filter :extract_user, :only => [ :history, :project ]
... if we do this we can get rid off the skip off :extract_user as well. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org