From 3a76fea7110963cb392d324ffbda07571990bd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 12 Jul 2010 20:06:26 +0200 Subject: [PATCH] feature #203: Removed authorization from Image and VirtualNetworks in the RM --- src/rm/RequestManagerImageAllocate.cc | 17 ----------------- src/rm/RequestManagerVirtualNetworkAllocate.cc | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/src/rm/RequestManagerImageAllocate.cc b/src/rm/RequestManagerImageAllocate.cc index 1722c1a3d0..64f8d064c4 100644 --- a/src/rm/RequestManagerImageAllocate.cc +++ b/src/rm/RequestManagerImageAllocate.cc @@ -58,19 +58,6 @@ void RequestManager::ImageAllocate::execute( uid = rc; - //Authorize the operation - if ( uid != 0 ) // uid == 0 means oneadmin - { - AuthRequest ar(uid); - - ar.add_auth(AuthRequest::IMAGE,-1,AuthRequest::CREATE,0,false); - - if (UserPool::authorize(ar) == -1) - { - goto error_authorize; - } - } - rc = ImageAllocate::ipool->allocate(uid,image_template,&iid); if ( rc < 0 ) @@ -94,10 +81,6 @@ error_authenticate: oss << "User not authenticated, aborting ImageAllocate call."; goto error_common; -error_authorize: - oss << "User not authorized to allocate a new IMAGE"; - goto error_common; - error_allocate: if (rc == -1) { diff --git a/src/rm/RequestManagerVirtualNetworkAllocate.cc b/src/rm/RequestManagerVirtualNetworkAllocate.cc index 2520fbcbc9..3c97f902b2 100644 --- a/src/rm/RequestManagerVirtualNetworkAllocate.cc +++ b/src/rm/RequestManagerVirtualNetworkAllocate.cc @@ -67,19 +67,6 @@ void RequestManager::VirtualNetworkAllocate::execute( user->unlock(); - //Authorize the operation - if ( uid != 0 ) // uid == 0 means oneadmin - { - AuthRequest ar(uid); - - ar.add_auth(AuthRequest::NET,-1,AuthRequest::CREATE,0,false); - - if (UserPool::authorize(ar) == -1) - { - goto error_authorize; - } - } - rc = vnpool->allocate(uid,stemplate,&nid); if ( rc < 0 ) @@ -107,10 +94,6 @@ error_get_user: oss << "User not recognized, cannot allocate VirtualNetwork"; goto error_common; -error_authorize: - oss << "User not authorized to create a VirtualNetwork"; - goto error_common; - error_vn_allocate: oss << "Error allocating VN with template: " << endl << stemplate; goto error_common;