mirror of https://github.com/citusdata/citus.git
Grant permissions to regularuser in new tests and fix view grants
parent
72afd2a238
commit
e291e51741
|
@ -1,5 +1,6 @@
|
|||
CREATE SCHEMA arbitrary_configs_router;
|
||||
SET search_path TO arbitrary_configs_router;
|
||||
GRANT ALL ON SCHEMA arbitrary_configs_router TO regularuser;
|
||||
CREATE TABLE articles_hash (
|
||||
id bigint NOT NULL,
|
||||
author_id bigint NOT NULL,
|
||||
|
@ -119,3 +120,4 @@ $$ LANGUAGE plpgsql;
|
|||
SET client_min_messages TO ERROR;
|
||||
CREATE VIEW test_view AS
|
||||
SELECT * FROM articles_hash WHERE author_id = 1;
|
||||
GRANT ALL ON test_view TO regularuser;
|
||||
|
|
|
@ -8,6 +8,7 @@ SELECT substring(:'server_version', '\d+')::int >= 15 AS server_version_ge_15
|
|||
DROP SCHEMA IF EXISTS merge_arbitrary_schema CASCADE;
|
||||
CREATE SCHEMA merge_arbitrary_schema;
|
||||
SET search_path TO merge_arbitrary_schema;
|
||||
GRANT ALL ON SCHEMA merge_arbitrary_schema TO regularuser;
|
||||
SET citus.shard_count TO 4;
|
||||
SET citus.next_shard_id TO 6000000;
|
||||
CREATE TABLE target_cj(tid int, src text, val int);
|
||||
|
|
|
@ -89,15 +89,15 @@ CREATE TABLE local (id bigserial PRIMARY KEY,
|
|||
title text);
|
||||
SET client_min_messages TO ERROR;
|
||||
CREATE VIEW "local regular view" AS SELECT * FROM local;
|
||||
GRANT ALL ON TABLE "local regular view" TO regularuser;
|
||||
GRANT ALL ON "local regular view" TO regularuser;
|
||||
CREATE VIEW dist_regular_view AS SELECT * FROM distributed;
|
||||
GRANT ALL ON TABLE dist_regular_view TO regularuser;
|
||||
GRANT ALL ON dist_regular_view TO regularuser;
|
||||
CREATE VIEW local_regular_view2 as SELECT count(*) FROM distributed JOIN "local regular view" USING (id);
|
||||
GRANT ALL ON TABLE local_regular_view2 TO regularuser;
|
||||
GRANT ALL ON local_regular_view2 TO regularuser;
|
||||
CREATE VIEW local_regular_view3 as SELECT count(*) FROM local JOIN dist_regular_view USING (id);
|
||||
GRANT ALL ON TABLE local_regular_view3 TO regularuser;
|
||||
GRANT ALL ON local_regular_view3 TO regularuser;
|
||||
CREATE VIEW "local regular view4" as SELECT count(*) as "my cny" FROM dist_regular_view JOIN "local regular view" USING (id);
|
||||
GRANT ALL ON TABLE "local regular view4" TO regularuser;
|
||||
GRANT ALL ON "local regular view4" TO regularuser;
|
||||
RESET client_min_messages;
|
||||
-- these above restrictions brought us to the following schema
|
||||
SELECT create_reference_table('reference');
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CREATE SCHEMA arbitrary_configs_router;
|
||||
SET search_path TO arbitrary_configs_router;
|
||||
GRANT ALL ON SCHEMA arbitrary_configs_router TO regularuser;
|
||||
|
||||
CREATE TABLE articles_hash (
|
||||
id bigint NOT NULL,
|
||||
|
@ -116,3 +117,4 @@ $$ LANGUAGE plpgsql;
|
|||
SET client_min_messages TO ERROR;
|
||||
CREATE VIEW test_view AS
|
||||
SELECT * FROM articles_hash WHERE author_id = 1;
|
||||
GRANT ALL ON test_view TO regularuser;
|
||||
|
|
|
@ -9,6 +9,7 @@ SELECT substring(:'server_version', '\d+')::int >= 15 AS server_version_ge_15
|
|||
DROP SCHEMA IF EXISTS merge_arbitrary_schema CASCADE;
|
||||
CREATE SCHEMA merge_arbitrary_schema;
|
||||
SET search_path TO merge_arbitrary_schema;
|
||||
GRANT ALL ON SCHEMA merge_arbitrary_schema TO regularuser;
|
||||
SET citus.shard_count TO 4;
|
||||
SET citus.next_shard_id TO 6000000;
|
||||
CREATE TABLE target_cj(tid int, src text, val int);
|
||||
|
|
|
@ -52,16 +52,16 @@ CREATE TABLE local (id bigserial PRIMARY KEY,
|
|||
title text);
|
||||
SET client_min_messages TO ERROR;
|
||||
CREATE VIEW "local regular view" AS SELECT * FROM local;
|
||||
GRANT ALL ON TABLE "local regular view" TO regularuser;
|
||||
GRANT ALL ON "local regular view" TO regularuser;
|
||||
CREATE VIEW dist_regular_view AS SELECT * FROM distributed;
|
||||
GRANT ALL ON TABLE dist_regular_view TO regularuser;
|
||||
GRANT ALL ON dist_regular_view TO regularuser;
|
||||
|
||||
CREATE VIEW local_regular_view2 as SELECT count(*) FROM distributed JOIN "local regular view" USING (id);
|
||||
GRANT ALL ON TABLE local_regular_view2 TO regularuser;
|
||||
GRANT ALL ON local_regular_view2 TO regularuser;
|
||||
CREATE VIEW local_regular_view3 as SELECT count(*) FROM local JOIN dist_regular_view USING (id);
|
||||
GRANT ALL ON TABLE local_regular_view3 TO regularuser;
|
||||
GRANT ALL ON local_regular_view3 TO regularuser;
|
||||
CREATE VIEW "local regular view4" as SELECT count(*) as "my cny" FROM dist_regular_view JOIN "local regular view" USING (id);
|
||||
GRANT ALL ON TABLE "local regular view4" TO regularuser;
|
||||
GRANT ALL ON "local regular view4" TO regularuser;
|
||||
RESET client_min_messages;
|
||||
|
||||
-- these above restrictions brought us to the following schema
|
||||
|
|
Loading…
Reference in New Issue