You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by es...@apache.org on 2017/02/03 09:00:04 UTC

[02/50] [abbrv] incubator-hawq git commit: HAWQ-1237. Modify hard code 'select' privilege in create_ranger_request_json_batch() in rangerrest.c

HAWQ-1237. Modify hard code 'select' privilege in create_ranger_request_json_batch() in rangerrest.c


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/4ca15874
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/4ca15874
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/4ca15874

Branch: refs/heads/2.1.0.0-incubating
Commit: 4ca158740fad957d5ffde0390757f64744eeefbe
Parents: eed9a0f
Author: Chunling Wang <wa...@126.com>
Authored: Tue Dec 27 10:11:13 2016 +0800
Committer: hzhang2 <zh...@163.com>
Committed: Wed Dec 28 17:12:42 2016 +0800

----------------------------------------------------------------------
 src/backend/libpq/rangerrest.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4ca15874/src/backend/libpq/rangerrest.c
----------------------------------------------------------------------
diff --git a/src/backend/libpq/rangerrest.c b/src/backend/libpq/rangerrest.c
index 59b33a8..120f64f 100644
--- a/src/backend/libpq/rangerrest.c
+++ b/src/backend/libpq/rangerrest.c
@@ -200,14 +200,12 @@ json_object *create_ranger_request_json_batch(List *args)
 
 		json_object_object_add(jelement, "resource", jresource);
 
-		//ListCell *cell;
-		//foreach(cell, arg_ptr->actions)
-		//{
-		char tmp[7] = "select";
-		json_object* jaction = json_object_new_string((char *)tmp);
-		//json_object* jaction = json_object_new_string((char *)cell->data.ptr_value);
-		json_object_array_add(jactions, jaction);
-		//}
+		ListCell *cell;
+		foreach(cell, arg_ptr->actions)
+		{
+		    json_object* jaction = json_object_new_string((char *)cell->data.ptr_value);
+		    json_object_array_add(jactions, jaction);
+		}
 		json_object_object_add(jelement, "privileges", jactions);
 		json_object_array_add(jaccess, jelement);