From 7f52021c1c13aed92d06025d25bd7bf32c5b2ca5 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 6 May 2010 22:51:33 +0000 Subject: [PATCH] CSPACE-1736: Added 'test@collectionspace.org' user to account, authentication, and authorization SQL load scripts in the Services layer. --- .../src/main/resources/db/mysql/test_account.sql | 11 ++++++++++- .../main/resources/db/mysql/test_authentication.sql | 2 ++ .../main/resources/db/mysql/test_authorization.sql | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/services/account/pstore/src/main/resources/db/mysql/test_account.sql b/services/account/pstore/src/main/resources/db/mysql/test_account.sql index 07e105784..52f5f4318 100644 --- a/services/account/pstore/src/main/resources/db/mysql/test_account.sql +++ b/services/account/pstore/src/main/resources/db/mysql/test_account.sql @@ -4,6 +4,15 @@ -- You may not use this file except in compliance with this License. -- use cspace; -INSERT INTO `cspace`.`accounts_common` (`csid`, `email`, `phone`, `mobile`, `userid`, `status`, `screen_name`, `created_at`) VALUES ('eeca40d7-dc77-4cc5-b489-16a53c75525a','test.test@berkeley.edu',NULL,NULL,'test','ACTIVE','test', '2010-02-17 16:31:48'); + +-- Tenants INSERT INTO `cspace`.`tenants` (`id`, `name`, `created_at`) VALUES ('1','movingimages.us', '2010-02-17 16:31:48'); + +-- Accounts +INSERT INTO `cspace`.`accounts_common` (`csid`, `email`, `phone`, `mobile`, `userid`, `status`, `screen_name`, `created_at`) VALUES ('eeca40d7-dc77-4cc5-b489-16a53c75525a','test.test@berkeley.edu',NULL,NULL,'test','ACTIVE','test', '2010-02-17 16:31:48'); +-- Additional account introduced during integration on release 0.6, and currently relied upon by the Application Layer. +INSERT INTO `cspace`.`accounts_common` (`csid`, `email`, `phone`, `mobile`, `userid`, `status`, `screen_name`, `created_at`) VALUES ('251f98f3-0292-4f3e-aa95-455314050e1b','test@collectionspace.org',NULL,NULL,'test@collectionspace.org','ACTIVE','test@collectionspace.org', '2010-05-03 12:35:00'); + +-- Association of accounts with tenants INSERT INTO `cspace`.`accounts_tenants` (`TENANTS_ACCOUNTSCOMMON_CSID`, `tenant_id`) VALUES ('eeca40d7-dc77-4cc5-b489-16a53c75525a', '1'); +INSERT INTO `cspace`.`accounts_tenants` (`TENANTS_ACCOUNTSCOMMON_CSID`, `tenant_id`) VALUES ('251f98f3-0292-4f3e-aa95-455314050e1b', '1'); \ No newline at end of file diff --git a/services/authentication/pstore/src/main/resources/db/mysql/test_authentication.sql b/services/authentication/pstore/src/main/resources/db/mysql/test_authentication.sql index 1a3979bdc..63ce9d3a3 100644 --- a/services/authentication/pstore/src/main/resources/db/mysql/test_authentication.sql +++ b/services/authentication/pstore/src/main/resources/db/mysql/test_authentication.sql @@ -6,3 +6,5 @@ use cspace; insert into `users` (`username`,`passwd`, `created_at`) VALUES ('test','n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=', '2010-02-17 16:31:48'); +-- Additional account introduced during integration on release 0.6, and currently relied upon by the Application Layer. +insert into `users` (`username`,`passwd`, `created_at`) VALUES ('test@collectionspace.org','NyaDNd1pMQRb3N+SYj/4GaZCRLU9DnRtQ4eXNJ1NpXg=', '2010-05-03 12:35:00'); diff --git a/services/authorization/pstore/src/main/resources/db/mysql/test_authorization.sql b/services/authorization/pstore/src/main/resources/db/mysql/test_authorization.sql index 874ed3e98..fdb980beb 100644 --- a/services/authorization/pstore/src/main/resources/db/mysql/test_authorization.sql +++ b/services/authorization/pstore/src/main/resources/db/mysql/test_authorization.sql @@ -14,6 +14,11 @@ insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `c insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('eeca40d7-dc77-4cc5-b489-16a53c75525a', 'test', '2', 'ROLE_USERS', '2010-02-17 16:31:48'); insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('eeca40d7-dc77-4cc5-b489-16a53c75525a', 'test', '3', 'ROLE_COLLECTIONS_MANAGER', '2010-02-17 16:31:48'); +-- Additional account introduced during integration on release 0.6, and currently relied upon by the Application Layer. +insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('251f98f3-0292-4f3e-aa95-455314050e1b', 'test', '1', 'ROLE_ADMINISTRATOR', '2010-05-03 12:35:00'); +insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('251f98f3-0292-4f3e-aa95-455314050e1b', 'test', '2', 'ROLE_USERS', '2010-05-03 12:35:00'); +insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('251f98f3-0292-4f3e-aa95-455314050e1b', 'test', '3', 'ROLE_COLLECTIONS_MANAGER', '2010-05-03 12:35:00'); + -- todo: barney is created in security test but accountrole is not yet created there, so add fake account id insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('1', 'barney', '2', 'ROLE_USERS', '2010-02-17 16:31:48'); insert into `accounts_roles`(`account_id`, `user_id`, `role_id`, `role_name`, `created_at`) values ('1', 'barney', '3', 'ROLE_COLLECTIONS_MANAGER', '2010-02-17 16:31:48'); -- 2.47.3