From c6d3246f711d0dab7cd19f9f3373c5faa4b8c5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=9CM=C3=9C=C5=9E?= <96421894+Tahinli@users.noreply.github.com> Date: Sun, 8 Dec 2024 06:05:25 +0300 Subject: [PATCH] feat: :sparkles: new role maintainer --- .../20241204225128_create_role_table.up.sql | 16 ++++++++++++---- .../20241204225135_create_user_table.up.sql | 15 +++++++++++---- .../20241204225143_create_post_table.up.sql | 15 +++++++++++---- .../20241204225151_create_comment_table.up.sql | 15 +++++++++++---- ...0241204225155_create_interaction_table.up.sql | 15 +++++++++++---- ...04230240_create_post_interaction_table.up.sql | 15 +++++++++++---- ...30248_create_comment_interaction_table.up.sql | 15 +++++++++++---- 7 files changed, 78 insertions(+), 28 deletions(-) diff --git a/migrations/20241204225128_create_role_table.up.sql b/migrations/20241204225128_create_role_table.up.sql index 67cd1b2..eeadb60 100644 --- a/migrations/20241204225128_create_role_table.up.sql +++ b/migrations/20241204225128_create_role_table.up.sql @@ -6,7 +6,8 @@ CREATE TABLE IF NOT EXISTS "role"( INSERT INTO "role"(id, name) VALUES (0, 'Ahmet Kaan Gümüş') ON CONFLICT(id) DO UPDATE SET "name" = 'Ahmet Kaan Gümüş'; INSERT INTO "role"(id, name) VALUES (1, 'Founder') ON CONFLICT(id) DO UPDATE SET "name" = 'Founder'; -INSERT INTO "role"(id, name) VALUES (2, 'Admin') ON CONFLICT(id) DO UPDATE SET "name" = 'Admin'; +INSERT INTO "role"(id, name) VALUES (2, 'Maintainer') ON CONFLICT(id) DO UPDATE SET "name" = 'Founder'; +INSERT INTO "role"(id, name) VALUES (3, 'Admin') ON CONFLICT(id) DO UPDATE SET "name" = 'Admin'; INSERT INTO "role"(id, name) VALUES (10, 'Normal') ON CONFLICT(id) DO UPDATE SET "name" = 'Normal'; INSERT INTO "role"(id, name) VALUES (-1, 'Banned') ON CONFLICT(id) DO UPDATE SET "name" = 'Banned'; @@ -48,11 +49,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204225135_create_user_table.up.sql b/migrations/20241204225135_create_user_table.up.sql index 04c2c58..0a2d781 100644 --- a/migrations/20241204225135_create_user_table.up.sql +++ b/migrations/20241204225135_create_user_table.up.sql @@ -40,7 +40,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -48,11 +48,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204225143_create_post_table.up.sql b/migrations/20241204225143_create_post_table.up.sql index d0f41a7..8855934 100644 --- a/migrations/20241204225143_create_post_table.up.sql +++ b/migrations/20241204225143_create_post_table.up.sql @@ -35,7 +35,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -43,11 +43,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204225151_create_comment_table.up.sql b/migrations/20241204225151_create_comment_table.up.sql index 98e7243..e8e4190 100644 --- a/migrations/20241204225151_create_comment_table.up.sql +++ b/migrations/20241204225151_create_comment_table.up.sql @@ -36,7 +36,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -44,11 +44,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204225155_create_interaction_table.up.sql b/migrations/20241204225155_create_interaction_table.up.sql index b4359e9..c97e8cc 100644 --- a/migrations/20241204225155_create_interaction_table.up.sql +++ b/migrations/20241204225155_create_interaction_table.up.sql @@ -34,7 +34,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -42,11 +42,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204230240_create_post_interaction_table.up.sql b/migrations/20241204230240_create_post_interaction_table.up.sql index e274032..ed27c27 100644 --- a/migrations/20241204230240_create_post_interaction_table.up.sql +++ b/migrations/20241204230240_create_post_interaction_table.up.sql @@ -36,7 +36,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -44,11 +44,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) diff --git a/migrations/20241204230248_create_comment_interaction_table.up.sql b/migrations/20241204230248_create_comment_interaction_table.up.sql index 8ba9960..d854bd0 100644 --- a/migrations/20241204230248_create_comment_interaction_table.up.sql +++ b/migrations/20241204230248_create_comment_interaction_table.up.sql @@ -36,7 +36,7 @@ ON CONFLICT(role_id) DO UPDATE SET "create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; -INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, @@ -44,11 +44,18 @@ ON CONFLICT(role_id) DO UPDATE SET "create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) -VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) +VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) +ON CONFLICT(role_id) DO UPDATE SET +"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE, +"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE, +"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE; + +INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) +VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE) ON CONFLICT(role_id) DO UPDATE SET "create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE, -"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE, -"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE; +"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE, +"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE; INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower) VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)