-- Saved Payment Management
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-87', 'CUSTOMER_SAVED_PAYMENT_MANAGEMENT', 'N');
INSERT INTO blc_permission_scope (id, "permission", is_permission_root, scope_id) VALUES('-400', 'CUSTOMER_SAVED_PAYMENT_MANAGEMENT', 'Y', '-100');
INSERT INTO blc_user_permission (id, archived, last_updated, "name") VALUES('-246', 'N', '1970-01-01 00:00:00.000', 'ALL_CUSTOMER_SAVED_PAYMENT_MANAGEMENT');
INSERT INTO blc_user_permission (id, archived, last_updated, "name") VALUES('-247', 'N', '1970-01-01 00:00:00.000', 'READ_CUSTOMER_SAVED_PAYMENT_MANAGEMENT');
INSERT INTO blc_client_permissions (id, "permission") VALUES('paymenttransactionclient', 'CREATE_SENSITIVE_CUSTOMER_PAYMENT_ACCOUNT');
INSERT INTO blc_client_permissions (id, "permission") VALUES('paymenttransactionclient', 'UPDATE_SENSITIVE_CUSTOMER_PAYMENT_ACCOUNT');
-- Payment Lock Management
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-86', 'PAYMENT_LOCK_MANAGEMENT', 'N');
INSERT INTO blc_permission_scope (id, "permission", is_permission_root, scope_id) VALUES('-132', 'PAYMENT_LOCK_MANAGEMENT', 'Y', '-86');
INSERT INTO blc_user_permission (id, archived, last_updated, "name") VALUES('-245', 'N', '1970-01-01 00:00:00.000', 'ALL_PAYMENT_LOCK_MANAGEMENT');
INSERT INTO blc_client_scopes (id, "scope") VALUES('cartopsclient', 'PAYMENT_LOCK_MANAGEMENT');
INSERT INTO blc_client_scopes (id, "scope") VALUES('orderopsclient', 'PAYMENT_LOCK_MANAGEMENT');
INSERT INTO blc_client_permissions (id, "permission") VALUES('cartopsclient', 'ALL_PAYMENT_LOCK_MANAGEMENT');
INSERT INTO blc_client_permissions (id, "permission") VALUES('orderopsclient', 'ALL_PAYMENT_LOCK_MANAGEMENT');
-- DEFAULT ROLE UPDATES
-- REQUIRED. Customer user role changes
-- ALL_CUSTOMER_SAVED_PAYMENT_MANAGEMENT permission
INSERT INTO blc_role_permission_xref (role_id, permission_id) VALUES ('-100', '-246');
-- CLAIM_TRANSACTIONS_FOR_REQUEST, SEND_ROLLBACK_EVENT, SEND_CHECKOUT_COMPLETION_EVENT
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-212', 'CLAIM_TRANSACTIONS_FOR_REQUEST', 'N');
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-213', 'SEND_ROLLBACK_EVENT', 'N');
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-214', 'SEND_CHECKOUT_COMPLETION_EVENT', 'N');
INSERT INTO blc_permission_scope(id, permission, is_permission_root, scope_id) VALUES('-212', 'CLAIM_TRANSACTIONS_FOR_REQUEST', 'Y', '-212');
INSERT INTO blc_permission_scope(id, permission, is_permission_root, scope_id) VALUES('-213', 'SEND_ROLLBACK_EVENT', 'Y', '-213');
INSERT INTO blc_permission_scope(id, permission, is_permission_root, scope_id) VALUES('-214', 'SEND_CHECKOUT_COMPLETION_EVENT', 'Y', '-214');
INSERT INTO blc_client_scopes(id, "scope") VALUES('cartopsclient', 'CLAIM_TRANSACTIONS_FOR_REQUEST');
INSERT INTO blc_client_scopes(id, "scope") VALUES('cartopsclient', 'SEND_ROLLBACK_EVENT');
INSERT INTO blc_client_scopes(id, "scope") VALUES('cartopsclient', 'SEND_CHECKOUT_COMPLETION_EVENT');
INSERT INTO blc_client_permissions(id, permission) VALUES('cartopsclient', 'UPDATE_CLAIM_TRANSACTIONS_FOR_REQUEST');
INSERT INTO blc_client_permissions(id, permission) VALUES('cartopsclient', 'UPDATE_SEND_ROLLBACK_EVENT');
INSERT INTO blc_client_permissions(id, permission) VALUES('cartopsclient', 'UPDATE_SEND_CHECKOUT_COMPLETION_EVENT');
-- 3DS_TRANSACTION_RESULT
INSERT INTO blc_security_scope (id, "name", "open") VALUES('-300', '3DS_TRANSACTION_RESULT', 'N');
INSERT INTO blc_permission_scope(id, permission, is_permission_root, scope_id) VALUES('-300', '3DS_TRANSACTION_RESULT', 'Y', '-300');
INSERT INTO blc_permission_scope(id, permission, is_permission_root, scope_id) VALUES('-600', '3DS_TRANSACTION_RESULT', 'Y', '-100');
INSERT INTO blc_user_permission(id, archived, last_updated, "name") VALUES('-600', 'N', '1970-01-01 00:00:00.000', 'ALL_3DS_TRANSACTION_RESULT');
INSERT INTO blc_client_scopes(id, "scope") VALUES('anonymous', '3DS_TRANSACTION_RESULT');
INSERT INTO blc_client_scopes(id, "scope") VALUES('cartopsclient', '3DS_TRANSACTION_RESULT');
INSERT INTO blc_client_permissions(id, permission) VALUES('anonymous', 'ALL_3DS_TRANSACTION_RESULT');
INSERT INTO blc_client_permissions(id, permission) VALUES('cartopsclient', 'ALL_3DS_TRANSACTION_RESULT');
INSERT INTO blc_role_permission_xref (role_id, permission_id) VALUES ('-100', '-600');