projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '16809-s3-v4-signature'
[arvados.git]
/
services
/
api
/
app
/
controllers
/
application_controller.rb
diff --git
a/services/api/app/controllers/application_controller.rb
b/services/api/app/controllers/application_controller.rb
index a3435d0b68387a6fe7edb26a4b767a583e7c2e29..2644a06579787082d8e1c7421a5288a085450684 100644
(file)
--- a/
services/api/app/controllers/application_controller.rb
+++ b/
services/api/app/controllers/application_controller.rb
@@
-63,7
+63,6
@@
class ApplicationController < ActionController::Base
:with => :render_error)
rescue_from(ActiveRecord::RecordNotFound,
ActionController::RoutingError,
:with => :render_error)
rescue_from(ActiveRecord::RecordNotFound,
ActionController::RoutingError,
- ActionController::UnknownController,
AbstractController::ActionNotFound,
:with => :render_not_found)
end
AbstractController::ActionNotFound,
:with => :render_not_found)
end
@@
-141,7
+140,7
@@
class ApplicationController < ActionController::Base
end
def only_admin_can_bypass_federation
end
def only_admin_can_bypass_federation
-
if params[:bypass_federation] && current_user.nil? or !current_user
.is_admin
+
unless !params[:bypass_federation] || current_user.andand
.is_admin
send_error("The bypass_federation parameter is only permitted when current user is admin", status: 403)
end
end
send_error("The bypass_federation parameter is only permitted when current user is admin", status: 403)
end
end
@@
-361,7
+360,7
@@
class ApplicationController < ActionController::Base
%w(created_at modified_by_client_uuid modified_by_user_uuid modified_at).each do |x|
@attrs.delete x.to_sym
end
%w(created_at modified_by_client_uuid modified_by_user_uuid modified_at).each do |x|
@attrs.delete x.to_sym
end
- @attrs = @attrs.symbolize_keys if @attrs.is_a? HashWithIndifferentAccess
+ @attrs = @attrs.symbolize_keys if @attrs.is_a?
ActiveSupport::
HashWithIndifferentAccess
@attrs
end
@attrs
end