From dcd36423d3e55e5d9ebb11286e184b4e78708c1d Mon Sep 17 00:00:00 2001 From: Konstantin Krivopustov Date: Sat, 31 Mar 2018 19:41:02 +0400 Subject: [PATCH] PL-10573 Denying role for anonymous user by default --- modules/core/db/init/hsql/create-db.sql | 6 ++++++ modules/core/db/init/mssql/create-db.sql | 6 ++++++ modules/core/db/init/mysql/create-db.sql | 6 ++++++ modules/core/db/init/oracle/create-db.sql | 6 ++++++ modules/core/db/init/postgres/create-db.sql | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/modules/core/db/init/hsql/create-db.sql b/modules/core/db/init/hsql/create-db.sql index 28334f30c8..5cfd97e654 100644 --- a/modules/core/db/init/hsql/create-db.sql +++ b/modules/core/db/init/hsql/create-db.sql @@ -917,9 +917,15 @@ values ('a405db59-e674-4f63-8afe-269dda788fe8', now(), 0, 'anonymous', 'anonymou insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) values ('0c018061-b26f-4de2-a5be-dff348347f93', current_timestamp, 0, 'Administrators', 10)^ +insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) +values ('cd541dd4-eeb7-cd5b-847e-d32236552fa9', current_timestamp, 0, 'Anonymous', 30)^ + insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) values ('c838be0a-96d0-4ef4-a7c0-dff348347f93', current_timestamp, 0, '60885987-1b61-4247-94c7-dff348347f93', '0c018061-b26f-4de2-a5be-dff348347f93')^ +insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) +values ('f01fb532-c2f0-dc18-b86c-450cf8a8d8c5', current_timestamp, 0, 'a405db59-e674-4f63-8afe-269dda788fe8', 'cd541dd4-eeb7-cd5b-847e-d32236552fa9')^ + INSERT INTO sec_filter (id,create_ts,created_by,version,update_ts,updated_by,delete_ts,deleted_by,component,name,xml,global_default,user_id) VALUES ('b61d18cb-e79a-46f3-b16d-eaf4aebb10dd',{ts '2010-03-01 11:14:06.830'},'admin',2,{ts '2010-03-01 11:52:53.170'},'admin',null,null,'[sec$User.browse].genericFilter','Search by role', ' diff --git a/modules/core/db/init/mssql/create-db.sql b/modules/core/db/init/mssql/create-db.sql index 11a831063e..a2c34f427c 100644 --- a/modules/core/db/init/mssql/create-db.sql +++ b/modules/core/db/init/mssql/create-db.sql @@ -971,9 +971,15 @@ values ('a405db59-e674-4f63-8afe-269dda788fe8', current_timestamp, 0, 'anonymous insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) values ('0c018061-b26f-4de2-a5be-dff348347f93', current_timestamp, 0, 'Administrators', 10)^ +insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) +values ('cd541dd4-eeb7-cd5b-847e-d32236552fa9', current_timestamp, 0, 'Anonymous', 30)^ + insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) values ('c838be0a-96d0-4ef4-a7c0-dff348347f93', current_timestamp, 0, '60885987-1b61-4247-94c7-dff348347f93', '0c018061-b26f-4de2-a5be-dff348347f93')^ +insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) +values ('f01fb532-c2f0-dc18-b86c-450cf8a8d8c5', current_timestamp, 0, 'a405db59-e674-4f63-8afe-269dda788fe8', 'cd541dd4-eeb7-cd5b-847e-d32236552fa9')^ + insert into SEC_FILTER (ID,CREATE_TS,CREATED_BY,VERSION,UPDATE_TS,UPDATED_BY,DELETE_TS,DELETED_BY,COMPONENT,NAME,XML,USER_ID,GLOBAL_DEFAULT) values ('b61d18cb-e79a-46f3-b16d-eaf4aebb10dd',{ts '2010-03-01 11:14:06.830'},'admin',2,{ts '2010-03-01 11:52:53.170'},'admin',null,null,'[sec$User.browse].genericFilter','Search by role', ' diff --git a/modules/core/db/init/mysql/create-db.sql b/modules/core/db/init/mysql/create-db.sql index 1d99759c5a..bd2d700c91 100644 --- a/modules/core/db/init/mysql/create-db.sql +++ b/modules/core/db/init/mysql/create-db.sql @@ -991,9 +991,15 @@ values ('a405db59e6744f638afe269dda788fe8', now(), 0, 'anonymous', 'anonymous', insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) values ('0c018061b26f4de2a5bedff348347f93', current_timestamp, 0, 'Administrators', 10)^ +insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) +values ('cd541dd4eeb7cd5b847ed32236552fa9', current_timestamp, 0, 'Anonymous', 30)^ + insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) values ('c838be0a96d04ef4a7c0dff348347f93', current_timestamp, 0, '608859871b61424794c7dff348347f93', '0c018061b26f4de2a5bedff348347f93')^ +insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) +values ('f01fb532c2f0dc18b86c450cf8a8d8c5', current_timestamp, 0, 'a405db59e6744f638afe269dda788fe8', 'cd541dd4eeb7cd5b847ed32236552fa9')^ + insert into SEC_FILTER (ID,CREATE_TS,CREATED_BY,VERSION,UPDATE_TS,UPDATED_BY,DELETE_TS,DELETED_BY,COMPONENT,NAME,XML,USER_ID,GLOBAL_DEFAULT) values ('b61d18cbe79a46f3b16deaf4aebb10dd',{ts '2010-03-01 11:14:06.830'},'admin',2,{ts '2010-03-01 11:52:53.170'},'admin',null,null,'[sec$User.browse].genericFilter','Search by role', ' diff --git a/modules/core/db/init/oracle/create-db.sql b/modules/core/db/init/oracle/create-db.sql index 7533f33454..adbcbdcc14 100644 --- a/modules/core/db/init/oracle/create-db.sql +++ b/modules/core/db/init/oracle/create-db.sql @@ -858,9 +858,15 @@ values ('a405db59e6744f638afe269dda788fe8', current_timestamp, 0, 'anonymous', ' insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) values ('0c018061b26f4de2a5bedff348347f93', current_timestamp, 0, 'Administrators', 10)^ +insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) +values ('cd541dd4eeb7cd5b847ed32236552fa9', current_timestamp, 0, 'Anonymous', 30)^ + insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) values ('c838be0a96d04ef4a7c0dff348347f93', current_timestamp, 0, '608859871b61424794c7dff348347f93', '0c018061b26f4de2a5bedff348347f93')^ +insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) +values ('f01fb532c2f0dc18b86c450cf8a8d8c5', current_timestamp, 0, 'a405db59e6744f638afe269dda788fe8', 'cd541dd4eeb7cd5b847ed32236552fa9')^ + insert into SEC_FILTER (ID,CREATE_TS,CREATED_BY,VERSION,COMPONENT,NAME,XML,USER_ID,GLOBAL_DEFAULT) values (newid(), current_timestamp, 'admin', 0, '[sec$User.browse].genericFilter', 'Search by role', ' diff --git a/modules/core/db/init/postgres/create-db.sql b/modules/core/db/init/postgres/create-db.sql index 3b052c926c..1fad65bc4f 100644 --- a/modules/core/db/init/postgres/create-db.sql +++ b/modules/core/db/init/postgres/create-db.sql @@ -954,9 +954,15 @@ values ('a405db59-e674-4f63-8afe-269dda788fe8', now(), 0, 'anonymous', 'anonymou insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) values ('0c018061-b26f-4de2-a5be-dff348347f93', now(), 0, 'Administrators', 10)^ +insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, ROLE_TYPE) +values ('cd541dd4-eeb7-cd5b-847e-d32236552fa9', now(), 0, 'Anonymous', 30)^ + insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) values ('c838be0a-96d0-4ef4-a7c0-dff348347f93', now(), 0, '60885987-1b61-4247-94c7-dff348347f93', '0c018061-b26f-4de2-a5be-dff348347f93')^ +insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID) +values ('f01fb532-c2f0-dc18-b86c-450cf8a8d8c5', now(), 0, 'a405db59-e674-4f63-8afe-269dda788fe8', 'cd541dd4-eeb7-cd5b-847e-d32236552fa9')^ + insert into SEC_FILTER (ID, CREATE_TS, CREATED_BY, VERSION, COMPONENT, NAME, XML, USER_ID, GLOBAL_DEFAULT) values ('b61d18cb-e79a-46f3-b16d-eaf4aebb10dd', now(), 'admin', 0, '[sec$User.browse].genericFilter', 'Search by role', 'ur.role.id = :component$genericFilter.UrMxpkfMGn32565NULL',