deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [8/11] git commit: CIMI: Replaced return by 'halt' in force_auth
Date Tue, 07 Aug 2012 17:17:48 GMT
CIMI: Replaced return by 'halt' in force_auth

* Use the Sinatra 'halt' helper instead of return
  to make sure the correct HTTP status code is being
  delivered to the client.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/3be4fd80
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/3be4fd80
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/3be4fd80

Branch: refs/heads/master
Commit: 3be4fd80f9af73430e52c28e2d0afd458bfa8e2b
Parents: 35970fe
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue Jul 31 14:30:18 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Aug 7 19:14:02 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/collections/cloud_entry_point.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3be4fd80/server/lib/cimi/collections/cloud_entry_point.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/cloud_entry_point.rb b/server/lib/cimi/collections/cloud_entry_point.rb
index 5aa2630..6371a06 100644
--- a/server/lib/cimi/collections/cloud_entry_point.rb
+++ b/server/lib/cimi/collections/cloud_entry_point.rb
@@ -22,7 +22,7 @@ module CIMI::Collections
         description "list all resources of the cloud"
         control do
           if params[:force_auth]
-            return [401, 'Authentication failed'] unless driver.valid_credentials?(credentials)
+            halt 401 unless driver.valid_credentials?(credentials)
           end
           entry_point = CIMI::Model::CloudEntryPoint.create(self)
           respond_to do |format|


Mime
View raw message