1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

Merge branch 'master' into ac/ac-1682/data-migrations-for-deprecated-permissions

This commit is contained in:
Rui Tomé
2023-12-06 16:08:58 +00:00
committed by GitHub
460 changed files with 18165 additions and 7610 deletions

View File

@ -0,0 +1,347 @@
CREATE TABLE #ExcludedOrganizationIds
(
ExcludedId UNIQUEIDENTIFIER
);
INSERT INTO "#ExcludedOrganizationIds" (ExcludedId)
VALUES
('dec8ffc3-24a8-4b5a-b057-ab7300c1ca1a'),
('cc4b8cdd-1202-49de-8830-ab6201160e64'),
('4dd79e1b-f687-431b-95b6-a9bf00bb9fa4'),
('b285df2d-303a-4ca9-ae67-aa96014738d1'),
('59f91ca0-648e-4cc9-a510-abf100ec1a21'),
('3ed5120e-83c2-4dcc-8b23-ab38014a0d91'),
('64dc181b-1d13-477f-8195-abd9012a26f4'),
('872ded84-c905-4b41-a2c0-ab340025b753'),
('3c711cd5-9637-405f-ae33-a9f90160ec48'),
('938521e7-ebf4-495a-843c-ac0b002af359'),
('ad471cd9-43bf-453f-a821-aaa60080ebd8'),
('8d84fe07-4c33-49fc-bd50-abe600d6abc0'),
('69260dd7-c3b9-4ee6-befa-abe70119b6b1'),
('f4d59aa4-27a2-4069-8136-abe20045bb1b'),
('d4c08576-3445-448c-85d1-ab4d0177ac62'),
('7e551c84-de10-47c7-99c3-ab9900ad52ba'),
('11a89fd8-f7ea-4a2f-bb1c-ab960148a39a'),
('adf816aa-a718-4475-9d59-aa69001243ed'),
('688290e3-4f87-4971-b33d-aa960132138f'),
('2f9b37eb-8369-400a-be9d-abb600b9ac35'),
('378c2fcf-7743-4a62-b5b8-ab53002f7aed'),
('a7484c44-b4c7-4929-ad68-aa6e01722fcd'),
('dbe92020-ac0a-4c77-b6a3-abe20011b0e8'),
('caf23986-c99b-46ae-8a5a-aac601429d19'),
('4edda88e-7237-4133-bbf6-abd40071877d'),
('c590bb09-a0ff-4fb4-afc7-aad800ffc0b3'),
('85961861-cf32-438b-9f37-ab2800d1b157'),
('5f85c290-a5f0-4a0c-b30b-a9bf010dd303'),
('7ae23fb4-2f30-42fb-8086-ac0300975b82'),
('ff01c1e7-ce9d-462b-9ed9-ab740024625e'),
('ecd53779-296e-471f-92b7-abe000d2bf93'),
('46d927ba-50e9-4e35-a7e5-ab440014fc52'),
('b26cd7ce-7ab4-4e65-ac44-ab3600f1fda3'),
('8b4c520f-5fdb-4292-860f-aa8a015a0d85'),
('005998c0-8ade-4413-8a93-ab3600461687'),
('678c0837-9e14-479b-9950-a9da0168a31d'),
('7209856c-f0ed-4e08-a052-ab2a0023e792'),
('adc89934-3aa3-47bf-b97a-ac1400fae3fe'),
('8bc546b2-abfe-4fb6-a35a-aad50177a49f'),
('2b51aa07-eb06-4eb0-8dec-aa6700ccade4'),
('930732ce-5164-45ca-b03e-aa6f0071345c'),
('4752d6da-e8f5-48d5-b7bd-a9c20032af38'),
('49ee2acd-43b3-4bda-a861-aa6e0145ebea'),
('8c3c7513-1683-437b-930b-abdc00e28a6b'),
('28e404dd-691d-4e9b-a36e-a9a800dbf8e7'),
('a393519a-2304-4a6c-878d-abfd003c98de'),
('51c724a9-cd4d-4f69-a70e-a9cd01201c56'),
('5321bf3c-243c-4b7b-8d51-abd30104ed28'),
('3c5db2bf-a62f-40dc-9dbb-abbc006ce471'),
('ab1b5c62-24dc-49f8-84c3-aadf01231826'),
('ce6ce28c-2069-4fdc-9ffb-ab7b002ad05f'),
('ed3b33e8-5598-47d9-8be6-aae201314bbc'),
('5eeeb882-1fcf-41a3-8b59-aa3d010c5571'),
('c12507d6-58a8-4f8a-8735-ab62015dfb39'),
('814bd196-3c53-4d87-9695-ab310188830c'),
('093fd8f8-693e-41a4-81be-a9ac00f1ec56'),
('563d5060-3e5a-4c8e-8d8c-aae4000c41ce'),
('64eeae1c-0393-41ff-8dcc-abfc0153c210'),
('cf1ba000-7559-480b-b975-abb000783cc6'),
('fadc026d-c067-4051-a149-abef011944ae'),
('77894628-1bce-489a-aeeb-ab36014dff46'),
('f46870e1-678f-4f57-86e8-a9da0155ae4e'),
('cbc7f817-910f-4831-bc79-ab7a010e08e1'),
('e9a8ce29-d20b-4db7-aabf-a9db0082966d'),
('8291fa84-197f-4115-8dd5-ab6b0087442b'),
('85b4f183-721b-420e-951c-aa64005c67a4'),
('f4383b65-7e80-499a-9d25-a9dd011aa1dc'),
('48814d2e-2f48-4bbf-91cf-ab5400cf548f'),
('989ca9b1-0ccc-433f-9ac6-ab4e002c0367'),
('8bb6a7f1-3a8b-453c-b86f-ab9b0122b7ae'),
('6db7d379-9157-4345-8570-ac22016b0c03'),
('1dfd63c2-fcc6-467e-8245-ac29014cb601'),
('aefc87e8-8471-4a0c-b878-ab31012676c1'),
('ceaef923-3e77-4d38-85ce-ab6000938d22'),
('714e290e-f6e4-4e70-af94-ac2701848c2e'),
('1ff77c9d-2690-4284-8ca3-ab4001656d79'),
('4f9f25a6-7956-4d2f-872c-aac100141019'),
('790b2b28-043b-431e-8557-ab6d0041a28a'),
('e00ae3ca-9d14-4279-982d-ab8e012e3c03'),
('2fa5aa1a-7f40-4221-8401-aaec01166862'),
('98b048fd-d849-4023-9fe1-aa3f01222d06'),
('50738bf6-7f93-4683-9168-aa3b00db7a69'),
('c21d8376-9188-4d60-ae91-a9d800454c20'),
('f140c244-ca18-4bff-a935-aa100062777a'),
('8b4b8dc7-7d2f-49e1-b4c7-a9ea012b6dd2'),
('90c0c00c-89df-463b-bce2-ab6a015a67ab'),
('d9631977-804b-4f01-94df-ab2600f774ea'),
('b5167b49-ae49-40cc-969a-ab27011a7f05'),
('ce43366b-4a01-450f-be01-aab800be0681'),
('9c256860-a37f-4597-a85c-aa920077b06e'),
('1966f667-d1f1-479f-9c3d-ab8a01722135'),
('444c85ec-95bc-430e-b100-aa430116076f'),
('16874d3a-bcbc-46d6-9293-ab010013604e'),
('0a8e73b8-da61-43de-bdb2-ab140012f879'),
('43990b6d-53fb-4099-80ab-ab84001d5410'),
('4921f98e-b441-42c9-89a2-ab5a0187401b'),
('5a9016f4-e155-4ed7-beb8-ab51003e6fcd'),
('8f85aff5-b8ee-4b3a-8950-aa6d006d2238'),
('d0b1665a-15a8-4a58-a37b-ab2401175b0b'),
('57e8447e-6cb6-49c4-9708-abea00296a38'),
('1fa32803-3e54-410d-8594-ac0d01438493'),
('962d76b8-dd2e-46ae-be6d-aab3012774c1'),
('50756ed5-01b6-445d-94ea-aa4c003fde85'),
('e788d585-c1f4-4d5e-9e5b-ab8c0167ff2c'),
('10feb09f-e7ce-4531-b6c7-ab69008de5d9'),
('b024e551-e2c5-4e79-9b2a-abc501753ebd'),
('e4f8f012-5485-44b4-ad15-ab2b012c56f4'),
('70f70af9-a9df-4f94-8df5-aa7b013da30f'),
('da904974-d064-4ea6-b421-ab3c0062b2a1'),
('1a457b86-1b4d-4df3-941a-ac100171bcec'),
('f94c10a0-b1d6-4660-bf23-ab7f01563fdd'),
('522ef599-ba76-4e54-99a7-a9c60109dc2a'),
('2ab7633e-6595-4ebd-b846-ab5a000610d0'),
('f838ca0e-8899-477f-b2a1-aa82014a1e79'),
('1b3a38ad-8ade-461f-be5d-ab2100f4eced'),
('97b71898-ab5a-4143-a4e2-aa21009c34de'),
('4f9ba2ec-cfd6-4026-9dfc-a86c0083d392'),
('be037379-16bf-4d00-b7dc-ab2b00fc1f2b'),
('076a9689-3458-462f-a815-ab45006ceeb9'),
('b3a4a265-bcc0-4ba1-9064-ab3b0066cdf5'),
('2adaa463-12de-49e6-bc5b-a9cc013b1edf'),
('57a391a2-fcfd-4a55-a368-a9f4018084f1'),
('ba5e7dc8-ffad-4e1d-bf86-a9dd00db663f'),
('aec81da6-b3a3-47fa-a4f0-aa4b017282dd'),
('784a4ae0-7146-4c99-bfb8-aafb00ee96c2'),
('27cd6a36-4a57-44f2-8563-aa3200dcf192'),
('3eaf4fbf-b0b1-4721-a162-ab1501095f5c'),
('801bfc2e-3897-41fa-aa2e-ab7001710542'),
('d9e23223-e684-477e-9949-abcd0139c0a9'),
('12fe7de2-8307-4766-99e6-a93300bcf099'),
('7568f7ba-895a-4c05-8e64-aa6c00ea4235'),
('6dd393b7-361f-400b-9a80-ab9a00714ed6'),
('63fbe2c1-91cd-4a61-adb3-aaec00f36aed'),
('4d77c08c-c0e5-40e5-8a31-abf5018251c2'),
('122f82ea-7d70-4f59-80a7-ab78000ee706'),
('9f9f6ddc-ac72-4a69-a485-abcc0040847e'),
('e99dbfe8-f076-400f-ae39-aafe00646378'),
('32f6c959-c6de-4544-846c-ab9801072d91'),
('948598be-1aa5-4667-ace8-aa65001d9ff8'),
('d40cb526-c481-4f46-9679-aad50110c9f8'),
('8ee54097-bfd3-46f0-ab3a-abbd010b2cd8'),
('d112f3e4-ed83-4ebb-8dcf-ab9e003c0945'),
('ca7496bd-f3c7-49f4-8cbf-aa80011382d6'),
('5243d4d7-274b-4d7d-b5a0-ab2f00338f60'),
('1fa29add-b653-467f-b517-ab960083b799'),
('bdf49b46-d7d7-42f5-9b5f-ab790125bdf3'),
('11671684-b6a5-403e-93f1-aaac000a6cfe'),
('59982841-8b15-439f-a105-ab2a0169d736'),
('fc4d85f7-5d76-4cbb-855d-aa600054c37f'),
('8eee78ce-e632-4430-aa04-a9d300f97f97'),
('2cdc37fe-61b9-46ac-b12e-ab7401421789'),
('9a391088-4dd9-4738-b5e9-ab7a01174e00'),
('8f0f69e0-d578-48bf-8234-ab6d00f671c4'),
('12314ee1-c386-434e-b116-ac0700ec705e'),
('9dc2e193-cf50-4f5c-ab27-aa6b01356aaa'),
('de57fdc7-ea93-459f-aa8d-aa420103fb24'),
('ec4f6871-3b2e-4c82-b075-aa1501516892'),
('05cfc1ce-4c86-4417-ac00-ac2b0080b915'),
('c58b3f75-4538-4383-8182-a9c8014f28bf'),
('a22a1fd4-30ee-4b7d-ab25-aa3e00e2025b'),
('db0595d1-3324-443f-b5e8-abee0093aef0'),
('dd96260f-d6e7-4231-a4f3-abdb003eda43'),
('9ce5c9e4-0fb3-451b-a419-aa7700527945'),
('366ae645-74f0-4105-9ce9-abc500b25b7f'),
('19e26466-2c02-4ee3-b25f-ac0e0160c9fc'),
('49666734-d5be-4d2b-8281-a9f700792a9e'),
('8109068e-7ca6-4e53-9d61-aa66011a45b9'),
('ba3810d3-c270-4dac-9e5f-ab66000c6317'),
('37ad9eee-026f-4c0b-a5ba-abe60168fffb'),
('f53ee7b2-e39a-4ddc-9194-aa1e010ab904'),
('2458cb30-09b4-44b9-b2f8-aa3501779846'),
('e32ad579-240e-4513-986e-aa4801340a90'),
('30ff7813-f4e3-4da4-8a8a-ab86014f982b'),
('06302a61-8ce7-4c66-bc9a-ab17016ca41e'),
('ff8dcbe1-bbc5-4013-9acc-aa13004d0e40'),
('e0eaa125-62f1-4dd2-baf5-aa2b0149b99b'),
('703d1977-705a-458d-b5c4-aa780051591c'),
('c49acc11-b581-410d-ba6a-ac2b01845320'),
('81084b94-1864-49a7-b877-abf30075264f'),
('ca41609f-0ef2-4268-94ba-aa9e00e0560e'),
('878ed95a-97e2-484e-9df9-ac230174b114'),
('2d58037d-4316-419e-b27c-aac00110c143'),
('22e7f61b-fee0-4e82-9fa2-ab7c00b577a0'),
('f24923f6-c3dc-4ce4-a3df-a9cf0089e0a1'),
('e48376fc-fcaf-40f7-aeb3-abea002c4617'),
('c1e3762e-f924-4649-bfed-abc500e77037'),
('f120a27d-07fc-4728-a359-abcd01258ae1'),
('07b961d2-6504-492d-afdb-a9f1013a848f'),
('d997745b-d826-4033-94e1-aaf10139c310'),
('0b772d98-4bdf-464e-9f4b-aba300430074'),
('1dfefb50-a730-4cc0-962b-ab7f01482a5b'),
('d4f5ae17-c1d7-4365-872a-abe700eed375'),
('da21de5a-1102-40a7-bbd4-aba60031a252'),
('e600b97f-e88d-4bb5-9095-aa6e004d147c'),
('d7317618-7c3d-4cad-bc08-ab2e005c3e1a'),
('45d45b24-f2c9-450b-a6fd-abe6011a6086'),
('0f2006bc-cd44-438f-8f9a-a9f301611824'),
('17677f01-e186-42a8-8bbd-ab30005d298f'),
('71c08801-8485-459e-8893-ab9e0010e6c7'),
('026a23b8-6130-4011-bfa1-ab190053b4a0'),
('6a2bd5b7-5b7c-4e31-b44e-abe3018b1811'),
('bbc6bebb-2dba-4b38-9289-abdf0148f0ca'),
('b9013ae4-eaf9-40f3-8fb9-ab80012abcc2'),
('3c7c92f6-6554-43bb-a711-ac21005f8db9'),
('455d535d-d68f-4146-89b1-ab3b017be189'),
('bc5dbd3c-b595-473a-a79a-ac1b00209e3f'),
('b538c147-2e69-4107-a555-ab4c01167177'),
('73832978-6ad4-4d0e-865e-ab39017cce9f'),
('ed26a566-ea31-4861-8d1f-ab3b012e621f'),
('08b0e0a9-ba20-4e58-8660-ab6c0162bf75'),
('cb5d18de-6e5e-4a7e-83c0-a9be0034e30e'),
('52515b20-8b77-48e7-b88a-abca015f6a3a'),
('f15b6c1d-bb2d-4851-8e36-ab1a014618bf'),
('a0df784e-6e0f-46ad-af70-aa170091958a'),
('2cab64a2-8322-46e4-9e20-ab22010c5fc2'),
('8e60660c-7e7d-4f2a-b049-abf000045450'),
('099fd470-a789-437f-8645-aaab01432218'),
('7693b8de-e778-44b7-84e9-aaaf0119db35'),
('9ae61ef1-ffc6-4ea2-99e3-abe8011785e2'),
('0204e23e-196a-4a70-9184-ab7f00145931'),
('ac4a9a5b-7545-4a45-ab2e-abe800205f5a'),
('af9ba60f-026c-47df-8bcd-aa120148a1d0'),
('d9fabc70-b404-4054-b674-ab7d0121f7b1'),
('09fa21ae-94b9-4a60-a3cc-a9e6015b7a9b'),
('c48b072a-3406-484a-86e0-ac0f00440b2d'),
('bd5f0301-46b0-4839-a6e2-ac0a01485b1d'),
('511741ca-4196-410e-a1aa-ab31014eb5d6'),
('6467ac4b-eeb0-4254-86e1-ab4d0180dea8'),
('945982f2-96c6-4f5a-9a10-ac09004c863d'),
('25440cae-5006-4230-b99c-aa73014ad0ae'),
('14653120-4391-407e-8fb7-abb200f89271'),
('387ab0f4-ec9c-47ea-9123-ab7a01047e31'),
('1fbdf873-49ec-4d07-9c97-aa680121b7af'),
('aea59245-403c-4387-b992-aae00116db12'),
('4d9a2c12-0d2a-442c-929f-aa6100005803'),
('4aa72634-dd58-4a93-837d-ab7b00b1c5bb'),
('e215be2d-d26b-484e-b907-ab870008712b'),
('84928852-71b4-4cfe-a07d-aaca0119357c'),
('c06cfde6-0396-4efe-b816-ab740043a155'),
('44071b57-7d58-419a-9020-aa070124916f'),
('017ad965-3fad-4016-9a20-aed0011c6de5'),
('c1dfb0f6-da6c-4e5f-9044-aa40001d6090'),
('3344b929-68db-4822-abcf-aabd01442fa3'),
('ecc3287d-b258-4c87-87d5-ab08015847fe'),
('20e9e399-53bd-49a7-a9d6-ab4d017a463d'),
('719ba2b6-9d00-4b87-a21b-ab9100376c90'),
('cea86f88-38e9-40df-ad08-aaeb014561f8'),
('325501f9-c3a0-45ae-8122-aadf00611651'),
('1109258c-3aef-4c15-9da2-abef014da457'),
('c3f4b2c5-c102-4fce-abda-ab0100dca585'),
('4109f60f-29a2-4073-93e6-aa9c0161dce4'),
('8fa02b36-4bbd-4d23-b5ed-ab5b002e7f0d'),
('32b3fbf5-4064-4ebe-baa7-aaa10162d934'),
('d60ac752-52e4-43d8-9b07-abda00bf6d0a'),
('a630205c-3ef9-4e54-94ac-aa7500ffd21d'),
('28bfc80e-070d-4d67-be39-ab78017a08b4'),
('d8c575b4-e4b1-43f7-8b7c-abeb001e073e'),
('8b2dc254-4a96-44f6-b84e-aa9401488c1c'),
('142bc8e5-b78b-4239-bd3d-aa0000263c41'),
('2556e04a-5ce9-41c6-8495-ab3e0146aa75'),
('61cc3d0b-5f60-4ee8-8218-a9ca016e64cd'),
('e44d3c3e-c750-48ef-beac-abe30158ae78'),
('9b4d719c-ee4b-41ee-9f01-ab6200c68782'),
('2680b593-5040-4d2a-ab61-aa6400a085d5'),
('6a5b05ec-580c-4fc3-b786-aaf500ee50a4'),
('e2cc24d8-bdff-406f-b8aa-ab51009710b2'),
('4d73092d-f5f3-4862-bf30-ab9e002d246f'),
('31124285-f18c-463d-896d-ab3801897e2a'),
('9b760a25-497f-4720-a136-aa12010654d9'),
('a5a8f5ba-17da-486e-b927-ac1a00c167de'),
('c332ecbd-3110-4344-bb94-aafc0176748f'),
('945beef5-f722-417e-b9af-aa920106c659'),
('13b0301d-09f3-4e9e-affe-abf500d660a9'),
('2b0b510b-17c5-4ac9-9a9f-ac1b0061936e'),
('75d3f88c-b16e-480c-832e-aaf0010adcdd'),
('675ea811-d203-4fa9-b94d-abe800713a28'),
('7c93777c-8be6-47dd-add5-ab6e0019d2b1'),
('deb7c7e7-dcba-49df-b047-aa5b01240c2f'),
('fb3b0dd9-dad9-4c78-a5cb-ab4f009d6c1f'),
('920b2e34-9a52-4ad1-9ac8-aa7c01490016'),
('3652c135-e6be-4bbb-ae18-aa130137f504'),
('b835940f-cab6-4224-9b23-ab260178dd9c'),
('b81d7501-6e41-4304-b4b3-abb9000066b2'),
('9e6cb7fe-352b-4a16-8560-abf5017368c9'),
('c625cf22-4c96-43ea-a433-a98c012db602'),
('07faa9ee-0577-408b-ae10-abca00862b2b'),
('799c8e15-c9bd-4e7e-9b1e-aba3011b6ff5'),
('849f5413-5b95-4976-b046-abac01597398'),
('28bea5ac-518d-46af-a9ad-ac77013792c7'),
('a4ccc9f3-da48-43c3-92c0-abe401329e23'),
('b5f5475c-5a8b-42ea-a33c-aabe004b57a6'),
('4e09c899-23af-4a13-b34b-aa1000bf5840'),
('b17cc0dd-6af0-40de-99de-aa3900f5b481'),
('940ff4d2-92a8-4ac5-9e93-ab8b01186109'),
('8a7358ed-9e34-4f33-9e54-abc00084e8ae'),
('ef529c37-25cd-4299-9bef-a9f700ef2834'),
('d3c92366-4e93-482b-b31e-aa48011781d2'),
('8c032a55-842b-4418-8582-aaa301399df6'),
('4b050547-c46c-4ca7-9051-abb40034b6ed'),
('aa72125a-d081-45e0-a106-ab4f016813d6'),
('e438b101-b88b-4446-aba5-aacc01840144'),
('4c312a51-119a-46af-a04c-ab790184dc14'),
('66de69da-c82b-493d-9e1b-ab25015316c9'),
('b28bf58e-675e-49f7-89ef-ab0e01755296'),
('3d1398a6-af73-4f79-b9b7-abe900647c6e'),
('733c96c3-b8b8-49f9-b745-ab3c00d75e9c'),
('8fcfd6cc-59bc-4b7a-ab6a-ab77002342e9'),
('a71df7d2-22d0-41ae-9fab-ab57001f4c43'),
('8d16f977-b6b9-4b8a-86d4-aa89007d3453'),
('029f2e3d-0332-4a66-96e1-ac0800a24084'),
('4e78b2d8-91c5-4ca1-b0c0-aad801044233'),
('0c2417f2-a5b8-4b84-878b-ac0b00c0461d'),
('f9a0714d-9901-4d64-b08f-abdb00f9453a'),
('3d2452bb-d376-485c-b3c4-ab470090afe4'),
('317f9615-ac24-4b53-baf0-ab69018330f2'),
('557aed8a-edb4-4600-9539-ab410165b4a6'),
('1f0d35ea-a585-41f5-b258-ab99003cd4cb'),
('cecf9e04-4ff8-41b1-88c8-aab50096e57a'),
('891b35c0-7af5-4bcc-9a03-abd200a48723'),
('7937ae0a-4f38-48b0-b39e-aa93015d681c'),
('69829207-9194-47e0-a012-ac07004e2302'),
('70f3068c-2db6-409c-b831-ac110103bf26'),
('9f72a10b-377a-4381-8b9e-abd3005a650f'),
('f935bdae-3147-46f3-a5b7-aba60106fad6'),
('4e234f3e-a0f5-4f17-9740-aa5500115b73'),
('605483a8-dc42-43ac-8a53-abe30133858c');
UPDATE
[org]
SET
[UsersGetPremium] = 0
FROM
[dbo].[Organization] AS [org]
LEFT JOIN [#ExcludedOrganizationIds] AS [ex]
ON [org].[Id] = [ex].[ExcludedId]
WHERE
[org].[PlanType] = 1 -- Families 2019 Annual
AND [ex].[ExcludedId] IS NULL;
DROP TABLE #ExcludedOrganizationIds;

View File

@ -0,0 +1,64 @@
/*
This procedure is used by the Bitwarden Admin Panel to retrieve the
Organizations a Reseller Provider is capable of adding as a client.
Currently, the procedure is only surfacing Organizations with the most
current Enterprise or Teams plans, but we actually need to surface any
Enterprise or Teams plan regardless of the version as all of them are
applicable to Resellers.
*/
-- Drop existing SPROC
IF OBJECT_ID('[dbo].[Organization_UnassignedToProviderSearch]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[Organization_UnassignedToProviderSearch]
END
GO
CREATE PROCEDURE [dbo].[Organization_UnassignedToProviderSearch]
@Name NVARCHAR(50),
@OwnerEmail NVARCHAR(256),
@Skip INT = 0,
@Take INT = 25
WITH RECOMPILE
AS
BEGIN
SET NOCOUNT ON
DECLARE @NameLikeSearch NVARCHAR(55) = '%' + @Name + '%'
DECLARE @OwnerLikeSearch NVARCHAR(55) = @OwnerEmail + '%'
IF @OwnerEmail IS NOT NULL
BEGIN
SELECT
O.*
FROM
[dbo].[OrganizationView] O
INNER JOIN
[dbo].[OrganizationUser] OU ON O.[Id] = OU.[OrganizationId]
INNER JOIN
[dbo].[User] U ON U.[Id] = OU.[UserId]
WHERE
((O.[PlanType] >= 2 AND O.[PlanType] <= 5) OR (O.[PlanType] >= 8 AND O.[PlanType] <= 15)) -- All 'Teams' and 'Enterprise' organizations
AND NOT EXISTS (SELECT * FROM [dbo].[ProviderOrganizationView] PO WHERE PO.[OrganizationId] = O.[Id])
AND (@Name IS NULL OR O.[Name] LIKE @NameLikeSearch)
AND (U.[Email] LIKE @OwnerLikeSearch)
ORDER BY O.[CreationDate] DESC
OFFSET @Skip ROWS
FETCH NEXT @Take ROWS ONLY
END
ELSE
BEGIN
SELECT
O.*
FROM
[dbo].[OrganizationView] O
WHERE
((O.[PlanType] >= 2 AND O.[PlanType] <= 5) OR (O.[PlanType] >= 8 AND O.[PlanType] <= 15)) -- All 'Teams' and 'Enterprise' organizations
AND NOT EXISTS (SELECT * FROM [dbo].[ProviderOrganizationView] PO WHERE PO.[OrganizationId] = O.[Id])
AND (@Name IS NULL OR O.[Name] LIKE @NameLikeSearch)
ORDER BY O.[CreationDate] DESC
OFFSET @Skip ROWS
FETCH NEXT @Take ROWS ONLY
END
END
GO

View File

@ -0,0 +1,16 @@
IF COL_LENGTH('[dbo].[Organization]', 'SecretsManagerBeta') IS NOT NULL
BEGIN
-- Set AccessSecretsManager to 0 for Organization Users in SM Beta orgs
UPDATE [dbo].[OrganizationUser]
SET AccessSecretsManager = 0
FROM [dbo].[OrganizationUser] AS ou
INNER JOIN [dbo].[Organization] AS o ON ou.OrganizationId = o.Id
WHERE o.SecretsManagerBeta = 1 AND ou.AccessSecretsManager = 1
-- Set UseSecretsManager and SecretsManagerBeta to 0 for Organizations in SM Beta
UPDATE [dbo].[Organization]
SET UseSecretsManager = 0, SecretsManagerBeta = 0
FROM [dbo].[Organization] AS o
WHERE o.SecretsManagerBeta = 1
END
GO

View File

@ -0,0 +1,407 @@
--Add column 'AllowAdminAccessToAllCollectionItems' to 'Organization' table
IF COL_LENGTH('[dbo].[Organization]', 'AllowAdminAccessToAllCollectionItems') IS NULL
BEGIN
ALTER TABLE
[dbo].[Organization]
ADD
[AllowAdminAccessToAllCollectionItems] BIT NOT NULL CONSTRAINT [DF_Organization_AllowAdminAccessToAllCollectionItems] DEFAULT (1)
END
GO
/**
ORGANIZATION STORED PROCEDURES
*/
--Alter `Organization_Create` sproc to include `AllowAdminAccessToAllCollectionItems` column and default value
CREATE OR ALTER PROCEDURE [dbo].[Organization_Create]
@Id UNIQUEIDENTIFIER OUTPUT,
@Identifier NVARCHAR(50),
@Name NVARCHAR(50),
@BusinessName NVARCHAR(50),
@BusinessAddress1 NVARCHAR(50),
@BusinessAddress2 NVARCHAR(50),
@BusinessAddress3 NVARCHAR(50),
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(256),
@Plan NVARCHAR(50),
@PlanType TINYINT,
@Seats INT,
@MaxCollections SMALLINT,
@UsePolicies BIT,
@UseSso BIT,
@UseGroups BIT,
@UseDirectory BIT,
@UseEvents BIT,
@UseTotp BIT,
@Use2fa BIT,
@UseApi BIT,
@UseResetPassword BIT,
@SelfHost BIT,
@UsersGetPremium BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@ReferenceData VARCHAR(MAX),
@Enabled BIT,
@LicenseKey VARCHAR(100),
@PublicKey VARCHAR(MAX),
@PrivateKey VARCHAR(MAX),
@TwoFactorProviders NVARCHAR(MAX),
@ExpirationDate DATETIME2(7),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7),
@OwnersNotifiedOfAutoscaling DATETIME2(7),
@MaxAutoscaleSeats INT,
@UseKeyConnector BIT = 0,
@UseScim BIT = 0,
@UseCustomPermissions BIT = 0,
@UseSecretsManager BIT = 0,
@Status TINYINT = 0,
@UsePasswordManager BIT = 1,
@SmSeats INT = null,
@SmServiceAccounts INT = null,
@MaxAutoscaleSmSeats INT= null,
@MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0,
@LimitCollectionCreationDeletion BIT = 1,
@AllowAdminAccessToAllCollectionItems BIT = 1
AS
BEGIN
SET NOCOUNT ON
INSERT INTO [dbo].[Organization]
(
[Id],
[Identifier],
[Name],
[BusinessName],
[BusinessAddress1],
[BusinessAddress2],
[BusinessAddress3],
[BusinessCountry],
[BusinessTaxNumber],
[BillingEmail],
[Plan],
[PlanType],
[Seats],
[MaxCollections],
[UsePolicies],
[UseSso],
[UseGroups],
[UseDirectory],
[UseEvents],
[UseTotp],
[Use2fa],
[UseApi],
[UseResetPassword],
[SelfHost],
[UsersGetPremium],
[Storage],
[MaxStorageGb],
[Gateway],
[GatewayCustomerId],
[GatewaySubscriptionId],
[ReferenceData],
[Enabled],
[LicenseKey],
[PublicKey],
[PrivateKey],
[TwoFactorProviders],
[ExpirationDate],
[CreationDate],
[RevisionDate],
[OwnersNotifiedOfAutoscaling],
[MaxAutoscaleSeats],
[UseKeyConnector],
[UseScim],
[UseCustomPermissions],
[UseSecretsManager],
[Status],
[UsePasswordManager],
[SmSeats],
[SmServiceAccounts],
[MaxAutoscaleSmSeats],
[MaxAutoscaleSmServiceAccounts],
[SecretsManagerBeta],
[LimitCollectionCreationDeletion],
[AllowAdminAccessToAllCollectionItems]
)
VALUES
(
@Id,
@Identifier,
@Name,
@BusinessName,
@BusinessAddress1,
@BusinessAddress2,
@BusinessAddress3,
@BusinessCountry,
@BusinessTaxNumber,
@BillingEmail,
@Plan,
@PlanType,
@Seats,
@MaxCollections,
@UsePolicies,
@UseSso,
@UseGroups,
@UseDirectory,
@UseEvents,
@UseTotp,
@Use2fa,
@UseApi,
@UseResetPassword,
@SelfHost,
@UsersGetPremium,
@Storage,
@MaxStorageGb,
@Gateway,
@GatewayCustomerId,
@GatewaySubscriptionId,
@ReferenceData,
@Enabled,
@LicenseKey,
@PublicKey,
@PrivateKey,
@TwoFactorProviders,
@ExpirationDate,
@CreationDate,
@RevisionDate,
@OwnersNotifiedOfAutoscaling,
@MaxAutoscaleSeats,
@UseKeyConnector,
@UseScim,
@UseCustomPermissions,
@UseSecretsManager,
@Status,
@UsePasswordManager,
@SmSeats,
@SmServiceAccounts,
@MaxAutoscaleSmSeats,
@MaxAutoscaleSmServiceAccounts,
@SecretsManagerBeta,
@LimitCollectionCreationDeletion,
@AllowAdminAccessToAllCollectionItems
)
END
GO
--Alter `Organization_Update` sproc to include `AllowAdminAccessToAllCollectionItems` column
CREATE OR ALTER PROCEDURE [dbo].[Organization_Update]
@Id UNIQUEIDENTIFIER,
@Identifier NVARCHAR(50),
@Name NVARCHAR(50),
@BusinessName NVARCHAR(50),
@BusinessAddress1 NVARCHAR(50),
@BusinessAddress2 NVARCHAR(50),
@BusinessAddress3 NVARCHAR(50),
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(256),
@Plan NVARCHAR(50),
@PlanType TINYINT,
@Seats INT,
@MaxCollections SMALLINT,
@UsePolicies BIT,
@UseSso BIT,
@UseGroups BIT,
@UseDirectory BIT,
@UseEvents BIT,
@UseTotp BIT,
@Use2fa BIT,
@UseApi BIT,
@UseResetPassword BIT,
@SelfHost BIT,
@UsersGetPremium BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@ReferenceData VARCHAR(MAX),
@Enabled BIT,
@LicenseKey VARCHAR(100),
@PublicKey VARCHAR(MAX),
@PrivateKey VARCHAR(MAX),
@TwoFactorProviders NVARCHAR(MAX),
@ExpirationDate DATETIME2(7),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7),
@OwnersNotifiedOfAutoscaling DATETIME2(7),
@MaxAutoscaleSeats INT,
@UseKeyConnector BIT = 0,
@UseScim BIT = 0,
@UseCustomPermissions BIT = 0,
@UseSecretsManager BIT = 0,
@Status TINYINT = 0,
@UsePasswordManager BIT = 1,
@SmSeats INT = null,
@SmServiceAccounts INT = null,
@MaxAutoscaleSmSeats INT = null,
@MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0,
@LimitCollectionCreationDeletion BIT = 1,
@AllowAdminAccessToAllCollectionItems BIT = 1
AS
BEGIN
SET NOCOUNT ON
UPDATE
[dbo].[Organization]
SET
[Identifier] = @Identifier,
[Name] = @Name,
[BusinessName] = @BusinessName,
[BusinessAddress1] = @BusinessAddress1,
[BusinessAddress2] = @BusinessAddress2,
[BusinessAddress3] = @BusinessAddress3,
[BusinessCountry] = @BusinessCountry,
[BusinessTaxNumber] = @BusinessTaxNumber,
[BillingEmail] = @BillingEmail,
[Plan] = @Plan,
[PlanType] = @PlanType,
[Seats] = @Seats,
[MaxCollections] = @MaxCollections,
[UsePolicies] = @UsePolicies,
[UseSso] = @UseSso,
[UseGroups] = @UseGroups,
[UseDirectory] = @UseDirectory,
[UseEvents] = @UseEvents,
[UseTotp] = @UseTotp,
[Use2fa] = @Use2fa,
[UseApi] = @UseApi,
[UseResetPassword] = @UseResetPassword,
[SelfHost] = @SelfHost,
[UsersGetPremium] = @UsersGetPremium,
[Storage] = @Storage,
[MaxStorageGb] = @MaxStorageGb,
[Gateway] = @Gateway,
[GatewayCustomerId] = @GatewayCustomerId,
[GatewaySubscriptionId] = @GatewaySubscriptionId,
[ReferenceData] = @ReferenceData,
[Enabled] = @Enabled,
[LicenseKey] = @LicenseKey,
[PublicKey] = @PublicKey,
[PrivateKey] = @PrivateKey,
[TwoFactorProviders] = @TwoFactorProviders,
[ExpirationDate] = @ExpirationDate,
[CreationDate] = @CreationDate,
[RevisionDate] = @RevisionDate,
[OwnersNotifiedOfAutoscaling] = @OwnersNotifiedOfAutoscaling,
[MaxAutoscaleSeats] = @MaxAutoscaleSeats,
[UseKeyConnector] = @UseKeyConnector,
[UseScim] = @UseScim,
[UseCustomPermissions] = @UseCustomPermissions,
[UseSecretsManager] = @UseSecretsManager,
[Status] = @Status,
[UsePasswordManager] = @UsePasswordManager,
[SmSeats] = @SmSeats,
[SmServiceAccounts] = @SmServiceAccounts,
[MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats,
[MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts,
[SecretsManagerBeta] = @SecretsManagerBeta,
[LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion,
[AllowAdminAccessToAllCollectionItems] = @AllowAdminAccessToAllCollectionItems
WHERE
[Id] = @Id
END
GO
/**
ORGANIZATION VIEWS
*/
--Add 'AllowAdminAccessToAllCollectionItems` to OrganizationUserOrganizationDetailsView
CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView]
AS
SELECT
OU.[UserId],
OU.[OrganizationId],
O.[Name],
O.[Enabled],
O.[PlanType],
O.[UsePolicies],
O.[UseSso],
O.[UseKeyConnector],
O.[UseScim],
O.[UseGroups],
O.[UseDirectory],
O.[UseEvents],
O.[UseTotp],
O.[Use2fa],
O.[UseApi],
O.[UseResetPassword],
O.[SelfHost],
O.[UsersGetPremium],
O.[UseCustomPermissions],
O.[UseSecretsManager],
O.[Seats],
O.[MaxCollections],
O.[MaxStorageGb],
O.[Identifier],
OU.[Key],
OU.[ResetPasswordKey],
O.[PublicKey],
O.[PrivateKey],
OU.[Status],
OU.[Type],
SU.[ExternalId] SsoExternalId,
OU.[Permissions],
PO.[ProviderId],
P.[Name] ProviderName,
P.[Type] ProviderType,
SS.[Data] SsoConfig,
OS.[FriendlyName] FamilySponsorshipFriendlyName,
OS.[LastSyncDate] FamilySponsorshipLastSyncDate,
OS.[ToDelete] FamilySponsorshipToDelete,
OS.[ValidUntil] FamilySponsorshipValidUntil,
OU.[AccessSecretsManager],
O.[UsePasswordManager],
O.[SmSeats],
O.[SmServiceAccounts],
O.[LimitCollectionCreationDeletion],
O.[AllowAdminAccessToAllCollectionItems]
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
LEFT JOIN
[dbo].[SsoUser] SU ON SU.[UserId] = OU.[UserId] AND SU.[OrganizationId] = OU.[OrganizationId]
LEFT JOIN
[dbo].[ProviderOrganization] PO ON PO.[OrganizationId] = O.[Id]
LEFT JOIN
[dbo].[Provider] P ON P.[Id] = PO.[ProviderId]
LEFT JOIN
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = OU.[OrganizationId]
LEFT JOIN
[dbo].[OrganizationSponsorship] OS ON OS.[SponsoringOrganizationUserID] = OU.[Id]
GO
--Manually refresh OrganizationView
IF OBJECT_ID('[dbo].[OrganizationView]') IS NOT NULL
BEGIN
EXECUTE sp_refreshsqlmodule N'[dbo].[OrganizationView]';
END
GO
/**
PROVIDER VIEWS - not directly modified, but access Organization table
*/
--Manually refresh ProviderOrganizationOrganizationDetailsView
IF OBJECT_ID('[dbo].[ProviderOrganizationOrganizationDetailsView]') IS NOT NULL
BEGIN
EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderOrganizationOrganizationDetailsView]';
END
GO
--Manually refresh ProviderUserProviderOrganizationDetailsView
IF OBJECT_ID('[dbo].[ProviderUserProviderOrganizationDetailsView]') IS NOT NULL
BEGIN
EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderUserProviderOrganizationDetailsView]';
END
GO

View File

@ -0,0 +1,334 @@
-- Flexible Collections: create new UserCipherDetails sproc that doesn't use AccessAll logic
CREATE OR ALTER FUNCTION [dbo].[UserCipherDetails_V2](@UserId UNIQUEIDENTIFIER)
RETURNS TABLE
AS RETURN
WITH [CTE] AS (
SELECT
[Id],
[OrganizationId]
FROM
[OrganizationUser]
WHERE
[UserId] = @UserId
AND [Status] = 2 -- Confirmed
)
SELECT
C.*,
COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) AS [Edit],
COALESCE(CU.[HidePasswords], CG.[HidePasswords], 0) AS [ViewPassword],
CASE
WHEN O.[UseTotp] = 1
THEN 1
ELSE 0
END [OrganizationUseTotp]
FROM
[dbo].[CipherDetails](@UserId) C
INNER JOIN
[CTE] OU ON C.[UserId] IS NULL AND C.[OrganizationId] IN (SELECT [OrganizationId] FROM [CTE])
INNER JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId] AND O.[Id] = C.[OrganizationId] AND O.[Enabled] = 1
LEFT JOIN
[dbo].[CollectionCipher] CC ON CC.[CipherId] = C.[Id]
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
WHERE
CU.[CollectionId] IS NOT NULL
OR CG.[CollectionId] IS NOT NULL
UNION ALL
SELECT
*,
1 [Edit],
1 [ViewPassword],
0 [OrganizationUseTotp]
FROM
[dbo].[CipherDetails](@UserId)
WHERE
[UserId] = @UserId
GO
-- Create v2 sprocs for all sprocs that call UserCipherDetails
-- CipherDetails_ReadByIdUserId_V2
CREATE OR ALTER PROCEDURE [dbo].[CipherDetails_ReadByIdUserId_V2]
@Id UNIQUEIDENTIFIER,
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT TOP 1
*
FROM
[dbo].[UserCipherDetails_V2](@UserId)
WHERE
[Id] = @Id
ORDER BY
[Edit] DESC
END
GO
-- CipherDetails_ReadByUserId_V2
CREATE OR ALTER PROCEDURE [dbo].[CipherDetails_ReadByUserId_V2]
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM
[dbo].[UserCipherDetails_V2](@UserId)
END
GO
-- Cipher_Delete_V2
CREATE OR ALTER PROCEDURE [dbo].[Cipher_Delete_V2]
@Ids AS [dbo].[GuidIdArray] READONLY,
@UserId AS UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #Temp
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
[OrganizationId] UNIQUEIDENTIFIER NULL,
[Attachments] BIT NOT NULL
)
INSERT INTO #Temp
SELECT
[Id],
[UserId],
[OrganizationId],
CASE WHEN [Attachments] IS NULL THEN 0 ELSE 1 END
FROM
[dbo].[UserCipherDetails_V2](@UserId)
WHERE
[Edit] = 1
AND [Id] IN (SELECT * FROM @Ids)
-- Delete ciphers
DELETE
FROM
[dbo].[Cipher]
WHERE
[Id] IN (SELECT [Id] FROM #Temp)
-- Cleanup orgs
DECLARE @OrgId UNIQUEIDENTIFIER
DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
SELECT
[OrganizationId]
FROM
#Temp
WHERE
[OrganizationId] IS NOT NULL
GROUP BY
[OrganizationId]
OPEN [OrgCursor]
FETCH NEXT FROM [OrgCursor] INTO @OrgId
WHILE @@FETCH_STATUS = 0 BEGIN
EXEC [dbo].[Organization_UpdateStorage] @OrgId
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
FETCH NEXT FROM [OrgCursor] INTO @OrgId
END
CLOSE [OrgCursor]
DEALLOCATE [OrgCursor]
-- Cleanup user
DECLARE @UserCiphersWithStorageCount INT
SELECT
@UserCiphersWithStorageCount = COUNT(1)
FROM
#Temp
WHERE
[UserId] IS NOT NULL
AND [Attachments] = 1
IF @UserCiphersWithStorageCount > 0
BEGIN
EXEC [dbo].[User_UpdateStorage] @UserId
END
EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
DROP TABLE #Temp
END
GO
-- Cipher_Move_V2
CREATE OR ALTER PROCEDURE [dbo].[Cipher_Move_V2]
@Ids AS [dbo].[GuidIdArray] READONLY,
@FolderId AS UNIQUEIDENTIFIER,
@UserId AS UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
DECLARE @UserIdKey VARCHAR(50) = CONCAT('"', @UserId, '"')
DECLARE @UserIdPath VARCHAR(50) = CONCAT('$.', @UserIdKey)
;WITH [IdsToMoveCTE] AS (
SELECT
[Id]
FROM
[dbo].[UserCipherDetails_V2](@UserId)
WHERE
[Id] IN (SELECT * FROM @Ids)
)
UPDATE
[dbo].[Cipher]
SET
[Folders] =
CASE
WHEN @FolderId IS NOT NULL AND [Folders] IS NULL THEN
CONCAT('{', @UserIdKey, ':"', @FolderId, '"', '}')
WHEN @FolderId IS NOT NULL THEN
JSON_MODIFY([Folders], @UserIdPath, CAST(@FolderId AS VARCHAR(50)))
ELSE
JSON_MODIFY([Folders], @UserIdPath, NULL)
END
WHERE
[Id] IN (SELECT * FROM [IdsToMoveCTE])
EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
END
GO
-- Cipher_Restore_V2
CREATE OR ALTER PROCEDURE [dbo].[Cipher_Restore_V2]
@Ids AS [dbo].[GuidIdArray] READONLY,
@UserId AS UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #Temp
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
[OrganizationId] UNIQUEIDENTIFIER NULL
)
INSERT INTO #Temp
SELECT
[Id],
[UserId],
[OrganizationId]
FROM
[dbo].[UserCipherDetails_V2](@UserId)
WHERE
[Edit] = 1
AND [DeletedDate] IS NOT NULL
AND [Id] IN (SELECT * FROM @Ids)
DECLARE @UtcNow DATETIME2(7) = GETUTCDATE();
UPDATE
[dbo].[Cipher]
SET
[DeletedDate] = NULL,
[RevisionDate] = @UtcNow
WHERE
[Id] IN (SELECT [Id] FROM #Temp)
-- Bump orgs
DECLARE @OrgId UNIQUEIDENTIFIER
DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
SELECT
[OrganizationId]
FROM
#Temp
WHERE
[OrganizationId] IS NOT NULL
GROUP BY
[OrganizationId]
OPEN [OrgCursor]
FETCH NEXT FROM [OrgCursor] INTO @OrgId
WHILE @@FETCH_STATUS = 0 BEGIN
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
FETCH NEXT FROM [OrgCursor] INTO @OrgId
END
CLOSE [OrgCursor]
DEALLOCATE [OrgCursor]
-- Bump user
EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
DROP TABLE #Temp
SELECT @UtcNow
END
GO
-- Cipher_SoftDelete_V2
CREATE OR ALTER PROCEDURE [dbo].[Cipher_SoftDelete_V2]
@Ids AS [dbo].[GuidIdArray] READONLY,
@UserId AS UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #Temp
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
[OrganizationId] UNIQUEIDENTIFIER NULL
)
INSERT INTO #Temp
SELECT
[Id],
[UserId],
[OrganizationId]
FROM
[dbo].[UserCipherDetails_V2](@UserId)
WHERE
[Edit] = 1
AND [DeletedDate] IS NULL
AND [Id] IN (SELECT * FROM @Ids)
-- Delete ciphers
DECLARE @UtcNow DATETIME2(7) = GETUTCDATE();
UPDATE
[dbo].[Cipher]
SET
[DeletedDate] = @UtcNow,
[RevisionDate] = @UtcNow
WHERE
[Id] IN (SELECT [Id] FROM #Temp)
-- Cleanup orgs
DECLARE @OrgId UNIQUEIDENTIFIER
DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
SELECT
[OrganizationId]
FROM
#Temp
WHERE
[OrganizationId] IS NOT NULL
GROUP BY
[OrganizationId]
OPEN [OrgCursor]
FETCH NEXT FROM [OrgCursor] INTO @OrgId
WHILE @@FETCH_STATUS = 0 BEGIN
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
FETCH NEXT FROM [OrgCursor] INTO @OrgId
END
CLOSE [OrgCursor]
DEALLOCATE [OrgCursor]
EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
DROP TABLE #Temp
END
GO

View File

@ -0,0 +1,62 @@
CREATE OR ALTER FUNCTION [dbo].[UserCipherDetails_V2](@UserId UNIQUEIDENTIFIER)
RETURNS TABLE
AS RETURN
WITH [CTE] AS (
SELECT
[Id],
[OrganizationId]
FROM
[OrganizationUser]
WHERE
[UserId] = @UserId
AND [Status] = 2 -- Confirmed
)
SELECT
C.*,
CASE
WHEN COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) = 0
THEN 1
ELSE 0
END [Edit],
CASE
WHEN COALESCE(CU.[HidePasswords], CG.[HidePasswords], 0) = 0
THEN 1
ELSE 0
END [ViewPassword],
CASE
WHEN O.[UseTotp] = 1
THEN 1
ELSE 0
END [OrganizationUseTotp]
FROM
[dbo].[CipherDetails](@UserId) C
INNER JOIN
[CTE] OU ON C.[UserId] IS NULL AND C.[OrganizationId] IN (SELECT [OrganizationId] FROM [CTE])
INNER JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId] AND O.[Id] = C.[OrganizationId] AND O.[Enabled] = 1
LEFT JOIN
[dbo].[CollectionCipher] CC ON CC.[CipherId] = C.[Id]
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
WHERE
CU.[CollectionId] IS NOT NULL
OR CG.[CollectionId] IS NOT NULL
UNION ALL
SELECT
*,
1 [Edit],
1 [ViewPassword],
0 [OrganizationUseTotp]
FROM
[dbo].[CipherDetails](@UserId)
WHERE
[UserId] = @UserId
GO

View File

@ -0,0 +1,212 @@
-- Flexible Collections: create new CollectionCipher sprocs that don't use AccessAll logic
-- CollectionCipher_ReadByUserId_V2
CREATE OR ALTER PROCEDURE [dbo].[CollectionCipher_ReadByUserId_V2]
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
CC.*
FROM
[dbo].[CollectionCipher] CC
INNER JOIN
[dbo].[Collection] S ON S.[Id] = CC.[CollectionId]
INNER JOIN
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] AND OU.[UserId] = @UserId
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = S.[Id] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
WHERE
OU.[Status] = 2 -- Confirmed
AND (
CU.[CollectionId] IS NOT NULL
OR CG.[CollectionId] IS NOT NULL
)
END
GO
-- CollectionCipher_ReadByUserIdCipherId_V2
CREATE OR ALTER PROCEDURE [dbo].[CollectionCipher_ReadByUserIdCipherId_V2]
@UserId UNIQUEIDENTIFIER,
@CipherId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
CC.*
FROM
[dbo].[CollectionCipher] CC
INNER JOIN
[dbo].[Collection] S ON S.[Id] = CC.[CollectionId]
INNER JOIN
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] AND OU.[UserId] = @UserId
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = S.[Id] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
WHERE
CC.[CipherId] = @CipherId
AND OU.[Status] = 2 -- Confirmed
AND (
CU.[CollectionId] IS NOT NULL
OR CG.[CollectionId] IS NOT NULL
)
END
GO
-- CollectionCipher_UpdateCollections_V2
CREATE OR ALTER PROCEDURE [dbo].[CollectionCipher_UpdateCollections_V2]
@CipherId UNIQUEIDENTIFIER,
@UserId UNIQUEIDENTIFIER,
@CollectionIds AS [dbo].[GuidIdArray] READONLY
AS
BEGIN
SET NOCOUNT ON
DECLARE @OrgId UNIQUEIDENTIFIER = (
SELECT TOP 1
[OrganizationId]
FROM
[dbo].[Cipher]
WHERE
[Id] = @CipherId
)
;WITH [AvailableCollectionsCTE] AS(
SELECT
C.[Id]
FROM
[dbo].[Collection] C
INNER JOIN
[Organization] O ON O.[Id] = C.[OrganizationId]
INNER JOIN
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = O.[Id] AND OU.[UserId] = @UserId
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = C.[Id] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = C.[Id] AND CG.[GroupId] = GU.[GroupId]
WHERE
O.[Id] = @OrgId
AND O.[Enabled] = 1
AND OU.[Status] = 2 -- Confirmed
AND (
CU.[ReadOnly] = 0
OR CG.[ReadOnly] = 0
)
),
[CollectionCiphersCTE] AS(
SELECT
[CollectionId],
[CipherId]
FROM
[dbo].[CollectionCipher]
WHERE
[CipherId] = @CipherId
)
MERGE
[CollectionCiphersCTE] AS [Target]
USING
@CollectionIds AS [Source]
ON
[Target].[CollectionId] = [Source].[Id]
AND [Target].[CipherId] = @CipherId
WHEN NOT MATCHED BY TARGET
AND [Source].[Id] IN (SELECT [Id] FROM [AvailableCollectionsCTE]) THEN
INSERT VALUES
(
[Source].[Id],
@CipherId
)
WHEN NOT MATCHED BY SOURCE
AND [Target].[CipherId] = @CipherId
AND [Target].[CollectionId] IN (SELECT [Id] FROM [AvailableCollectionsCTE]) THEN
DELETE
;
IF @OrgId IS NOT NULL
BEGIN
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
END
END
GO
-- CollectionCipher_UpdateCollectionsForCiphers_V2
CREATE OR ALTER PROCEDURE [dbo].[CollectionCipher_UpdateCollectionsForCiphers_V2]
@CipherIds AS [dbo].[GuidIdArray] READONLY,
@OrganizationId UNIQUEIDENTIFIER,
@UserId UNIQUEIDENTIFIER,
@CollectionIds AS [dbo].[GuidIdArray] READONLY
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #AvailableCollections (
[Id] UNIQUEIDENTIFIER
)
INSERT INTO #AvailableCollections
SELECT
C.[Id]
FROM
[dbo].[Collection] C
INNER JOIN
[Organization] O ON O.[Id] = C.[OrganizationId]
INNER JOIN
[dbo].[OrganizationUser] OU ON OU.[OrganizationId] = O.[Id] AND OU.[UserId] = @UserId
LEFT JOIN
[dbo].[CollectionUser] CU ON CU.[CollectionId] = C.[Id] AND CU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
LEFT JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
LEFT JOIN
[dbo].[CollectionGroup] CG ON CG.[CollectionId] = C.[Id] AND CG.[GroupId] = GU.[GroupId]
WHERE
O.[Id] = @OrganizationId
AND O.[Enabled] = 1
AND OU.[Status] = 2 -- Confirmed
AND (
CU.[ReadOnly] = 0
OR CG.[ReadOnly] = 0
)
IF (SELECT COUNT(1) FROM #AvailableCollections) < 1
BEGIN
-- No writable collections available to share with in this organization.
RETURN
END
INSERT INTO [dbo].[CollectionCipher]
(
[CollectionId],
[CipherId]
)
SELECT
[Collection].[Id],
[Cipher].[Id]
FROM
@CollectionIds [Collection]
INNER JOIN
@CipherIds [Cipher] ON 1 = 1
WHERE
[Collection].[Id] IN (SELECT [Id] FROM #AvailableCollections)
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrganizationId
END
GO

View File

@ -6,7 +6,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="dbup-sqlserver" Version="5.0.8" />
<PackageReference Include="dbup-sqlserver" Version="5.0.37" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>

View File

@ -4,13 +4,13 @@
"net6.0": {
"dbup-sqlserver": {
"type": "Direct",
"requested": "[5.0.8, )",
"resolved": "5.0.8",
"contentHash": "b954l5Zgj9qgHtm16SLq2qGLJ0gIZtrWdh6JHoUsCLMHYW+0K2Oevabquw447At4U6X2t4CNuy7ZLHYf/Z/8yg==",
"requested": "[5.0.37, )",
"resolved": "5.0.37",
"contentHash": "nSmm8ImnqY/cyvlUolyn7cl+xekEe2syq2jb6mpqCsGvDUnJNFTQGE2N0R3wtIDBBc/e/waTMzYvVCgQkLxNnw==",
"dependencies": {
"Microsoft.Azure.Services.AppAuthentication": "1.6.2",
"Microsoft.Data.SqlClient": "5.0.1",
"dbup-core": "5.0.8"
"Microsoft.Data.SqlClient": "5.1.1",
"dbup-core": "5.0.37"
}
},
"Microsoft.Extensions.Logging": {
@ -180,8 +180,8 @@
},
"dbup-core": {
"type": "Transitive",
"resolved": "5.0.8",
"contentHash": "d+3RxJDftcarp1Y7jI78HRdRWRC7VFjM+rB2CFHWDmao6OixuLrqiyEo1DeuMNrWLTR5mmE8p1YTpFOvozI9ZQ==",
"resolved": "5.0.37",
"contentHash": "++z5z25tgkJ4eiLp3MahAmTkEDQogj5SoGXfDX0PxatjQfGszuR5hK3JBaB1orfCJ68mjZGtKWEp9YcxXa4jjg==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Diagnostics.TraceSource": "4.3.0"
@ -195,6 +195,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
"Duende.IdentityServer": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
"dependencies": {
"Duende.IdentityServer.Storage": "6.0.4",
"Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
}
},
"Duende.IdentityServer.Storage": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
"dependencies": {
"IdentityModel": "6.0.0",
"Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
}
},
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@ -223,57 +241,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
"resolved": "2.1.2",
"contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
"resolved": "2.1.4",
"contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
"dependencies": {
"Newtonsoft.Json": "11.0.2",
"System.Text.Encodings.Web": "4.7.0"
}
},
"IdentityModel.AspNetCore.OAuth2Introspection": {
"type": "Transitive",
"resolved": "4.0.1",
"contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
"dependencies": {
"IdentityModel": "4.0.0"
}
},
"IdentityServer4": {
"type": "Transitive",
"resolved": "4.1.2",
"contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
"dependencies": {
"IdentityModel": "4.4.0",
"IdentityServer4.Storage": "4.1.2",
"Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
"Newtonsoft.Json": "12.0.2"
}
},
"IdentityServer4.AccessTokenValidation": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
"dependencies": {
"IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
"Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
}
},
"IdentityServer4.Storage": {
"type": "Transitive",
"resolved": "4.1.2",
"contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
"dependencies": {
"IdentityModel": "4.4.0"
}
"resolved": "6.0.0",
"contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@ -282,26 +259,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
"resolved": "6.2.0",
"contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
"resolved": "5.1.0",
"contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
"LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
"resolved": "3.3.0",
"contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
"LaunchDarkly.CommonSdk": "6.0.0",
"LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@ -316,13 +294,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
"resolved": "8.0.0",
"contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
"LaunchDarkly.CommonSdk": "6.0.0",
"LaunchDarkly.EventSource": "5.0.1",
"LaunchDarkly.InternalSdk": "3.1.0",
"LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.EventSource": "5.1.0",
"LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@ -350,10 +328,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
"resolved": "6.0.0",
"contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@ -386,8 +364,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
"resolved": "3.1.32",
"contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
"resolved": "6.0.0",
"contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@ -481,32 +459,28 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
"resolved": "5.1.1",
"contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
"Azure.Identity": "1.6.0",
"Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
"Microsoft.Identity.Client": "4.45.0",
"Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
"Azure.Identity": "1.7.0",
"Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
"Microsoft.Identity.Client": "4.47.2",
"Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
"Microsoft.Win32.Registry": "5.0.0",
"System.Buffers": "4.5.1",
"System.Configuration.ConfigurationManager": "5.0.0",
"System.Diagnostics.DiagnosticSource": "5.0.0",
"System.IO": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime.Caching": "5.0.0",
"System.Configuration.ConfigurationManager": "6.0.1",
"System.Diagnostics.DiagnosticSource": "6.0.0",
"System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
"System.Text.Encoding.CodePages": "5.0.0",
"System.Text.Encodings.Web": "4.7.2"
"System.Text.Encoding.CodePages": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
"resolved": "5.1.0",
"contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
@ -746,8 +720,8 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
"resolved": "6.22.0",
"contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
"resolved": "6.24.0",
"contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.Clients.ActiveDirectory": {
"type": "Transitive",
@ -771,45 +745,47 @@
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
"resolved": "6.24.0",
"contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
"Microsoft.IdentityModel.Tokens": "6.21.0"
"Microsoft.IdentityModel.Tokens": "6.24.0",
"System.Text.Encoding": "4.3.0",
"System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
"resolved": "6.24.0",
"contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "6.21.0"
"Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
"resolved": "6.24.0",
"contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
"Microsoft.IdentityModel.Logging": "6.21.0",
"Microsoft.IdentityModel.Tokens": "6.21.0"
"Microsoft.IdentityModel.Logging": "6.24.0",
"Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
"resolved": "6.24.0",
"contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
"Microsoft.IdentityModel.Protocols": "6.21.0",
"System.IdentityModel.Tokens.Jwt": "6.21.0"
"Microsoft.IdentityModel.Protocols": "6.24.0",
"System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
"resolved": "6.24.0",
"contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
"Microsoft.IdentityModel.Logging": "6.21.0",
"Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@ -935,8 +911,8 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NSec.Cryptography": {
"type": "Transitive",
@ -1249,8 +1225,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
"resolved": "2.0.6",
"contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
"resolved": "2.0.9",
"contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@ -1393,8 +1369,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
"resolved": "6.0.1",
"contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@ -1580,11 +1556,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
"resolved": "6.21.0",
"contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
"resolved": "6.24.0",
"contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
"Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
"Microsoft.IdentityModel.Tokens": "6.21.0"
"Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
"Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@ -2074,10 +2050,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
"resolved": "6.0.0",
"contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
"System.Configuration.ConfigurationManager": "5.0.0"
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@ -2653,11 +2629,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
"Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
"Handlebars.Net": "[2.1.2, )",
"IdentityServer4": "[4.1.2, )",
"IdentityServer4.AccessTokenValidation": "[3.0.1, )",
"LaunchDarkly.ServerSdk": "[7.0.0, )",
"Handlebars.Net": "[2.1.4, )",
"LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@ -2667,7 +2642,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
"Newtonsoft.Json": "[13.0.1, )",
"Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@ -2676,7 +2651,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
"Serilog.Sinks.SyslogMessages": "[2.0.6, )",
"Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}