diff --git a/.headroom.yaml b/.headroom.yaml index 7d884252c14..a594f355edd 100644 --- a/.headroom.yaml +++ b/.headroom.yaml @@ -12,7 +12,7 @@ variables: organization: Wire Swiss GmbH email: opensource@wire.com project: This file is part of the Wire Server implementation. - year: '2020' + year: '2022' license-headers: haskell: file-extensions: ["hs", "hsc"] diff --git a/CHANGELOG.md b/CHANGELOG.md index e6b66eb36bf..0e9611cb462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ +# [2022-01-27] + +## Release notes + +* The `nginz` chart now configures nginx to only allow cross-origin requests from an explicit allow list of subdomains. By default these are: + + ```yaml + nginz: + nginx_conf: + allowlisted_origins: + - webapp + - teams + - account + ``` + + If you changed the names of these services, you must adjust those names in the nginz config as well. (#1630, #2073, 116988c62732) + +* Backend now separates conversation access control for guests and services. The old access roles are still supported but it is encouraged to upgrade clients since mapping between the old access roles and the new access roles is not isomorphic. For more details refer to the API changes below or the Swagger docs. + Old clients are fully supported; if new clients and old clients are mixed, to old clients, either guests of services may appear to be enable if they are not, which may lead to error messages (confusing but harmless). (#2035) + +## API changes + +* Endpoints that recently have accepted `access_role` in their payload will now accept `access_role_v2` as well which will take precedence over `access_role`. See Swagger docs for how values are mapped. Endpoints that recently have returned `access_role` in their payload will now additionally return the `access_role_v2` field. (#2035) + +## Features + +* Conversation access roles now distinguish between guests and services. (#2035) + +## Bug fixes and other updates + +* There is now an explicit CORS allow list for *all* endpoints. In previous releases, all subdomains were accepted, however they must now be listed explicitly. This is a **breaking change**, as now only known Javascript applications may access the backend. (#1630, #2073, 116988c62732) +* Prevent 500s when SFTs are not reachable from Backend (#2077) + +## Internal changes + +* Bump hsaml2 package version (#2075) +* Separate Spar.Data module into smaller Cassandra interpreters (#2064) +* Fix some HLint issues in libs/wire-api. (#2065) +* Fix broken build process of package "old-time" for some environments (#2056) +* Refresh license headers (#2062) +* Rename Spar.Sem.ScimTokenStore.GetByTeam to LookupByTeam (#2068) + +## Federation changes + +* Tag several federation tests cases for the M2 release (#2045) + + # [2022-01-18] ## Release notes diff --git a/charts/nginz/templates/conf/_nginx.conf.tpl b/charts/nginz/templates/conf/_nginx.conf.tpl index 1e3d9937046..58cade243b0 100644 --- a/charts/nginz/templates/conf/_nginx.conf.tpl +++ b/charts/nginz/templates/conf/_nginx.conf.tpl @@ -125,7 +125,9 @@ http { map $http_origin $cors_header { default ""; - "~^https://([^/]+\.)?{{ .Values.nginx_conf.external_env_domain | replace "." "\\." }}(:[0-9]{2,5})?$" "$http_origin"; + {{ range $origin := .Values.nginx_conf.allowlisted_origins }} + "https://{{ $origin }}.{{ $.Values.nginx_conf.external_env_domain}}" "$http_origin"; + {{ end }} } @@ -293,11 +295,7 @@ http { more_set_headers 'Access-Control-Allow-Credentials: true'; {{ end -}} - {{ if ($location.restrict_whitelisted_origin) -}} more_set_headers 'Access-Control-Allow-Origin: $cors_header'; - {{- else }} - more_set_headers 'Access-Control-Allow-Origin: $http_origin'; - {{- end }} more_set_headers 'Access-Control-Expose-Headers: Request-Id, Location'; more_set_headers 'Request-Id: $request_id'; diff --git a/charts/nginz/values.yaml b/charts/nginz/values.yaml index 5c0f7ebd819..3cf782871e6 100644 --- a/charts/nginz/values.yaml +++ b/charts/nginz/values.yaml @@ -52,6 +52,11 @@ nginx_conf: - ~* ^/conversations/([^/]*)/call/state - /search/top - /search/common + # -- The origins from which we allow CORS requests. These are combined with 'external_env_domain' to form a full url + allowlisted_origins: + - webapp + - teams + - account upstreams: cargohold: - path: ~* ^/conversations/([^/]*)/assets @@ -79,7 +84,6 @@ nginx_conf: envs: - all allow_credentials: true - restrict_whitelisted_origin: true max_body_size: "0" disable_request_buffering: true brig: @@ -149,7 +153,6 @@ nginx_conf: envs: - all allow_credentials: true - restrict_whitelisted_origin: true - path: /bot/self envs: - all @@ -170,13 +173,11 @@ nginx_conf: envs: - all allow_credentials: true - restrict_whitelisted_origin: true disable_zauth: true - path: /activate envs: - all allow_credentials: true - restrict_whitelisted_origin: true disable_zauth: true - path: /delete envs: @@ -238,7 +239,6 @@ nginx_conf: - all disable_zauth: true allow_credentials: true - restrict_whitelisted_origin: true unlimited_requests_endpoint: true - path: /login envs: diff --git a/dev-packages.nix b/dev-packages.nix index 73522c868eb..96e37719841 100644 --- a/dev-packages.nix +++ b/dev-packages.nix @@ -159,6 +159,7 @@ let export LIBRARY_PATH="${compile-deps}/lib" export PKG_CONFIG_PATH="${compile-deps}/lib/pkgconfig" export PATH="${compile-deps}/bin" + export CONFIG_SHELL="${compile-deps}/bin/sh" exec "${pkgs.cabal-install}/bin/cabal" "$@" ''; in diff --git a/docs/reference/cassandra-schema.cql b/docs/reference/cassandra-schema.cql index 08b33cbd7f8..914a8236f9b 100644 --- a/docs/reference/cassandra-schema.cql +++ b/docs/reference/cassandra-schema.cql @@ -227,6 +227,7 @@ CREATE TABLE galley_test.conversation ( conv uuid PRIMARY KEY, access set, access_role int, + access_roles_v2 set, creator uuid, deleted boolean, message_timer bigint, diff --git a/hack/helm_vars/wire-server/values.yaml.gotmpl b/hack/helm_vars/wire-server/values.yaml.gotmpl index 107aec9f9d3..98810a0b212 100644 --- a/hack/helm_vars/wire-server/values.yaml.gotmpl +++ b/hack/helm_vars/wire-server/values.yaml.gotmpl @@ -194,6 +194,8 @@ nginz: nginx_conf: env: staging external_env_domain: zinfra.io + # NOTE: Web apps are disabled by default + allowlisted_origins: [] secrets: basicAuth: "whatever" zAuth: diff --git a/libs/api-bot/src/Network/Wire/Bot.hs b/libs/api-bot/src/Network/Wire/Bot.hs index 10b137bc0d2..3a9341fd755 100644 --- a/libs/api-bot/src/Network/Wire/Bot.hs +++ b/libs/api-bot/src/Network/Wire/Bot.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Assert.hs b/libs/api-bot/src/Network/Wire/Bot/Assert.hs index b94a1367c81..138c2fd4ab5 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Assert.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Assert.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Cache.hs b/libs/api-bot/src/Network/Wire/Bot/Cache.hs index 214735df44a..612a7c9eb17 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Cache.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Cache.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Clients.hs b/libs/api-bot/src/Network/Wire/Bot/Clients.hs index d0605c15116..707b02ce90a 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Clients.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Clients.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Crypto.hs b/libs/api-bot/src/Network/Wire/Bot/Crypto.hs index 01d779f9252..3e7ca8b526b 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Crypto.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Crypto.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Crypto/Glue.hs b/libs/api-bot/src/Network/Wire/Bot/Crypto/Glue.hs index 61e306f7f27..1905fe82b1e 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Crypto/Glue.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Crypto/Glue.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Email.hs b/libs/api-bot/src/Network/Wire/Bot/Email.hs index 243554bbbfe..73406dea5be 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Email.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Email.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Metrics.hs b/libs/api-bot/src/Network/Wire/Bot/Metrics.hs index 5784e8468b7..e4ffc3e9cc8 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Metrics.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Metrics.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Monad.hs b/libs/api-bot/src/Network/Wire/Bot/Monad.hs index 45f65c4e3d4..79bc2792167 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Monad.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Monad.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Report.hs b/libs/api-bot/src/Network/Wire/Bot/Report.hs index 1f6c1abcd2f..a729ad0cd9c 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Report.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Report.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Report/Text.hs b/libs/api-bot/src/Network/Wire/Bot/Report/Text.hs index 66f4f2e58cb..d12a59a30ba 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Report/Text.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Report/Text.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-bot/src/Network/Wire/Bot/Settings.hs b/libs/api-bot/src/Network/Wire/Bot/Settings.hs index 9bdaa85cf2d..823adb2697b 100644 --- a/libs/api-bot/src/Network/Wire/Bot/Settings.hs +++ b/libs/api-bot/src/Network/Wire/Bot/Settings.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client.hs b/libs/api-client/src/Network/Wire/Client.hs index 9cb68faa46d..40c34639322 100644 --- a/libs/api-client/src/Network/Wire/Client.hs +++ b/libs/api-client/src/Network/Wire/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Asset.hs b/libs/api-client/src/Network/Wire/Client/API/Asset.hs index b39ac5bb7aa..9fc48d83188 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Asset.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Asset.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Auth.hs b/libs/api-client/src/Network/Wire/Client/API/Auth.hs index 24c4f8c7ec8..12c6c7816eb 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Auth.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Auth.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Client.hs b/libs/api-client/src/Network/Wire/Client/API/Client.hs index 22d9336e2ab..4d436ce4798 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Client.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Client.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Conversation.hs b/libs/api-client/src/Network/Wire/Client/API/Conversation.hs index 80345558b11..2fffb2f5528 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Conversation.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Conversation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Push.hs b/libs/api-client/src/Network/Wire/Client/API/Push.hs index 0a0dba80a97..c89176582b0 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Push.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Push.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/Search.hs b/libs/api-client/src/Network/Wire/Client/API/Search.hs index 51b2c688c57..0d96eb72c5f 100644 --- a/libs/api-client/src/Network/Wire/Client/API/Search.hs +++ b/libs/api-client/src/Network/Wire/Client/API/Search.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/API/User.hs b/libs/api-client/src/Network/Wire/Client/API/User.hs index 07a31637c2d..7bb4f472e67 100644 --- a/libs/api-client/src/Network/Wire/Client/API/User.hs +++ b/libs/api-client/src/Network/Wire/Client/API/User.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/HTTP.hs b/libs/api-client/src/Network/Wire/Client/HTTP.hs index e04313af0b0..4e5090d0fa1 100644 --- a/libs/api-client/src/Network/Wire/Client/HTTP.hs +++ b/libs/api-client/src/Network/Wire/Client/HTTP.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/Monad.hs b/libs/api-client/src/Network/Wire/Client/Monad.hs index 63197bef41e..cb6af59bd3d 100644 --- a/libs/api-client/src/Network/Wire/Client/Monad.hs +++ b/libs/api-client/src/Network/Wire/Client/Monad.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/api-client/src/Network/Wire/Client/Session.hs b/libs/api-client/src/Network/Wire/Client/Session.hs index 25f40f58425..51aa5f0cad3 100644 --- a/libs/api-client/src/Network/Wire/Client/Session.hs +++ b/libs/api-client/src/Network/Wire/Client/Session.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/examples/google.hs b/libs/bilge/examples/google.hs index 3e6d3e6d906..fe272d6c3f5 100644 --- a/libs/bilge/examples/google.hs +++ b/libs/bilge/examples/google.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge.hs b/libs/bilge/src/Bilge.hs index be4605dd6b9..cb14be26b41 100644 --- a/libs/bilge/src/Bilge.hs +++ b/libs/bilge/src/Bilge.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/Assert.hs b/libs/bilge/src/Bilge/Assert.hs index eff19553a31..03393bd9bc3 100644 --- a/libs/bilge/src/Bilge/Assert.hs +++ b/libs/bilge/src/Bilge/Assert.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/IO.hs b/libs/bilge/src/Bilge/IO.hs index 9166df1bd79..16db8d84c9d 100644 --- a/libs/bilge/src/Bilge/IO.hs +++ b/libs/bilge/src/Bilge/IO.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/RPC.hs b/libs/bilge/src/Bilge/RPC.hs index 8e91f0880f4..fbdf4bae7bd 100644 --- a/libs/bilge/src/Bilge/RPC.hs +++ b/libs/bilge/src/Bilge/RPC.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/Request.hs b/libs/bilge/src/Bilge/Request.hs index 9ef79201c70..f7461d0523c 100644 --- a/libs/bilge/src/Bilge/Request.hs +++ b/libs/bilge/src/Bilge/Request.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/Response.hs b/libs/bilge/src/Bilge/Response.hs index 5b6e373cba4..22c1b755078 100644 --- a/libs/bilge/src/Bilge/Response.hs +++ b/libs/bilge/src/Bilge/Response.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/Retry.hs b/libs/bilge/src/Bilge/Retry.hs index 2386effe304..0b499b9c18d 100644 --- a/libs/bilge/src/Bilge/Retry.hs +++ b/libs/bilge/src/Bilge/Retry.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/bilge/src/Bilge/TestSession.hs b/libs/bilge/src/Bilge/TestSession.hs index 72c3cff3fe9..4b53b3221e3 100644 --- a/libs/bilge/src/Bilge/TestSession.hs +++ b/libs/bilge/src/Bilge/TestSession.hs @@ -1,5 +1,22 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Bilge.TestSession where import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow) diff --git a/libs/brig-types/src/Brig/Types.hs b/libs/brig-types/src/Brig/Types.hs index fb1cff375a9..11789a8820c 100644 --- a/libs/brig-types/src/Brig/Types.hs +++ b/libs/brig-types/src/Brig/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Activation.hs b/libs/brig-types/src/Brig/Types/Activation.hs index 2d3607e5ac1..463848c74c5 100644 --- a/libs/brig-types/src/Brig/Types/Activation.hs +++ b/libs/brig-types/src/Brig/Types/Activation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Calling.hs b/libs/brig-types/src/Brig/Types/Calling.hs index 2d7ee7ecfc1..3089e4fa1fc 100644 --- a/libs/brig-types/src/Brig/Types/Calling.hs +++ b/libs/brig-types/src/Brig/Types/Calling.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Client.hs b/libs/brig-types/src/Brig/Types/Client.hs index 667653e9bbe..c209f38e942 100644 --- a/libs/brig-types/src/Brig/Types/Client.hs +++ b/libs/brig-types/src/Brig/Types/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Client/Prekey.hs b/libs/brig-types/src/Brig/Types/Client/Prekey.hs index bf4b27b9bda..b9a207027e9 100644 --- a/libs/brig-types/src/Brig/Types/Client/Prekey.hs +++ b/libs/brig-types/src/Brig/Types/Client/Prekey.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Code.hs b/libs/brig-types/src/Brig/Types/Code.hs index 9ff96df056c..eadf541362e 100644 --- a/libs/brig-types/src/Brig/Types/Code.hs +++ b/libs/brig-types/src/Brig/Types/Code.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Common.hs b/libs/brig-types/src/Brig/Types/Common.hs index bfc1cbef1ca..b92ec418674 100644 --- a/libs/brig-types/src/Brig/Types/Common.hs +++ b/libs/brig-types/src/Brig/Types/Common.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Connection.hs b/libs/brig-types/src/Brig/Types/Connection.hs index 73bb4a802a9..f9f24145fa0 100644 --- a/libs/brig-types/src/Brig/Types/Connection.hs +++ b/libs/brig-types/src/Brig/Types/Connection.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Instances.hs b/libs/brig-types/src/Brig/Types/Instances.hs index 9e280ad5888..c9e19c77970 100644 --- a/libs/brig-types/src/Brig/Types/Instances.hs +++ b/libs/brig-types/src/Brig/Types/Instances.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Intra.hs b/libs/brig-types/src/Brig/Types/Intra.hs index 1a29afb02f1..88654161391 100644 --- a/libs/brig-types/src/Brig/Types/Intra.hs +++ b/libs/brig-types/src/Brig/Types/Intra.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Properties.hs b/libs/brig-types/src/Brig/Types/Properties.hs index d43618971d8..40ae0efbcc9 100644 --- a/libs/brig-types/src/Brig/Types/Properties.hs +++ b/libs/brig-types/src/Brig/Types/Properties.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Provider.hs b/libs/brig-types/src/Brig/Types/Provider.hs index 49e726766ac..5bb976d6b4b 100644 --- a/libs/brig-types/src/Brig/Types/Provider.hs +++ b/libs/brig-types/src/Brig/Types/Provider.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Provider/External.hs b/libs/brig-types/src/Brig/Types/Provider/External.hs index 1bcb23e9621..597310657b0 100644 --- a/libs/brig-types/src/Brig/Types/Provider/External.hs +++ b/libs/brig-types/src/Brig/Types/Provider/External.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Provider/Tag.hs b/libs/brig-types/src/Brig/Types/Provider/Tag.hs index f8f351bd5cf..2b2744f5382 100644 --- a/libs/brig-types/src/Brig/Types/Provider/Tag.hs +++ b/libs/brig-types/src/Brig/Types/Provider/Tag.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Search.hs b/libs/brig-types/src/Brig/Types/Search.hs index e660ae504f5..37ce1e30092 100644 --- a/libs/brig-types/src/Brig/Types/Search.hs +++ b/libs/brig-types/src/Brig/Types/Search.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Team.hs b/libs/brig-types/src/Brig/Types/Team.hs index 5a7fa5ea722..06ddae0800e 100644 --- a/libs/brig-types/src/Brig/Types/Team.hs +++ b/libs/brig-types/src/Brig/Types/Team.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Team/Invitation.hs b/libs/brig-types/src/Brig/Types/Team/Invitation.hs index 226c9f9ec0e..c04ed90e321 100644 --- a/libs/brig-types/src/Brig/Types/Team/Invitation.hs +++ b/libs/brig-types/src/Brig/Types/Team/Invitation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Team/LegalHold.hs b/libs/brig-types/src/Brig/Types/Team/LegalHold.hs index 4adedab0866..321f65f22ee 100644 --- a/libs/brig-types/src/Brig/Types/Team/LegalHold.hs +++ b/libs/brig-types/src/Brig/Types/Team/LegalHold.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/Test/Arbitrary.hs b/libs/brig-types/src/Brig/Types/Test/Arbitrary.hs index f80bdae10fe..653a4169009 100644 --- a/libs/brig-types/src/Brig/Types/Test/Arbitrary.hs +++ b/libs/brig-types/src/Brig/Types/Test/Arbitrary.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/User.hs b/libs/brig-types/src/Brig/Types/User.hs index cf17f6e524a..044a5866128 100644 --- a/libs/brig-types/src/Brig/Types/User.hs +++ b/libs/brig-types/src/Brig/Types/User.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/User/Auth.hs b/libs/brig-types/src/Brig/Types/User/Auth.hs index 4b7d8d29759..c5a0f837a1b 100644 --- a/libs/brig-types/src/Brig/Types/User/Auth.hs +++ b/libs/brig-types/src/Brig/Types/User/Auth.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/src/Brig/Types/User/Event.hs b/libs/brig-types/src/Brig/Types/User/Event.hs index 382eae7af51..e558245bd8b 100644 --- a/libs/brig-types/src/Brig/Types/User/Event.hs +++ b/libs/brig-types/src/Brig/Types/User/Event.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/test/unit/Main.hs b/libs/brig-types/test/unit/Main.hs index 906e9172b15..7da0a636284 100644 --- a/libs/brig-types/test/unit/Main.hs +++ b/libs/brig-types/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/test/unit/Test/Brig/Roundtrip.hs b/libs/brig-types/test/unit/Test/Brig/Roundtrip.hs index a03687fa236..9ea421c6c2f 100644 --- a/libs/brig-types/test/unit/Test/Brig/Roundtrip.hs +++ b/libs/brig-types/test/unit/Test/Brig/Roundtrip.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/test/unit/Test/Brig/Types/Common.hs b/libs/brig-types/test/unit/Test/Brig/Types/Common.hs index 92c518b521a..6ef039f3cfe 100644 --- a/libs/brig-types/test/unit/Test/Brig/Types/Common.hs +++ b/libs/brig-types/test/unit/Test/Brig/Types/Common.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/test/unit/Test/Brig/Types/Team.hs b/libs/brig-types/test/unit/Test/Brig/Types/Team.hs index 9a7c2969b7b..b95b4c72542 100644 --- a/libs/brig-types/test/unit/Test/Brig/Types/Team.hs +++ b/libs/brig-types/test/unit/Test/Brig/Types/Team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/brig-types/test/unit/Test/Brig/Types/User.hs b/libs/brig-types/test/unit/Test/Brig/Types/User.hs index 9742dfc389d..5ca8600d467 100644 --- a/libs/brig-types/test/unit/Test/Brig/Types/User.hs +++ b/libs/brig-types/test/unit/Test/Brig/Types/User.hs @@ -10,7 +10,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cargohold-types/src/CargoHold/Types.hs b/libs/cargohold-types/src/CargoHold/Types.hs index c63d4e8829b..c2d5ebc0b01 100644 --- a/libs/cargohold-types/src/CargoHold/Types.hs +++ b/libs/cargohold-types/src/CargoHold/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cargohold-types/src/CargoHold/Types/V3.hs b/libs/cargohold-types/src/CargoHold/Types/V3.hs index e0b8ee3fe1f..539f9dc478d 100644 --- a/libs/cargohold-types/src/CargoHold/Types/V3.hs +++ b/libs/cargohold-types/src/CargoHold/Types/V3.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra.hs b/libs/cassandra-util/src/Cassandra.hs index cb479bf5abd..6774abbeb56 100644 --- a/libs/cassandra-util/src/Cassandra.hs +++ b/libs/cassandra-util/src/Cassandra.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra/CQL.hs b/libs/cassandra-util/src/Cassandra/CQL.hs index c0e29560691..d1e1e7c8c73 100644 --- a/libs/cassandra-util/src/Cassandra/CQL.hs +++ b/libs/cassandra-util/src/Cassandra/CQL.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra/Exec.hs b/libs/cassandra-util/src/Cassandra/Exec.hs index d39188bc039..6cb9c56129d 100644 --- a/libs/cassandra-util/src/Cassandra/Exec.hs +++ b/libs/cassandra-util/src/Cassandra/Exec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra/Schema.hs b/libs/cassandra-util/src/Cassandra/Schema.hs index 9abf9b4ba27..4877f8df064 100644 --- a/libs/cassandra-util/src/Cassandra/Schema.hs +++ b/libs/cassandra-util/src/Cassandra/Schema.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra/Settings.hs b/libs/cassandra-util/src/Cassandra/Settings.hs index ae289828c0d..c20a6dfc3ef 100644 --- a/libs/cassandra-util/src/Cassandra/Settings.hs +++ b/libs/cassandra-util/src/Cassandra/Settings.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/cassandra-util/src/Cassandra/Util.hs b/libs/cassandra-util/src/Cassandra/Util.hs index 348c1fa0f2a..54ea705f25c 100644 --- a/libs/cassandra-util/src/Cassandra/Util.hs +++ b/libs/cassandra-util/src/Cassandra/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/deriving-swagger2/src/Deriving/Swagger.hs b/libs/deriving-swagger2/src/Deriving/Swagger.hs index 31cf1359d7f..a1c0487378b 100644 --- a/libs/deriving-swagger2/src/Deriving/Swagger.hs +++ b/libs/deriving-swagger2/src/Deriving/Swagger.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/dns-util/src/Wire/Network/DNS/Effect.hs b/libs/dns-util/src/Wire/Network/DNS/Effect.hs index 0b55358f46b..d054685d318 100644 --- a/libs/dns-util/src/Wire/Network/DNS/Effect.hs +++ b/libs/dns-util/src/Wire/Network/DNS/Effect.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/dns-util/src/Wire/Network/DNS/Helper.hs b/libs/dns-util/src/Wire/Network/DNS/Helper.hs index 7529d57536e..56c118ee91c 100644 --- a/libs/dns-util/src/Wire/Network/DNS/Helper.hs +++ b/libs/dns-util/src/Wire/Network/DNS/Helper.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/dns-util/src/Wire/Network/DNS/SRV.hs b/libs/dns-util/src/Wire/Network/DNS/SRV.hs index 168a75cdbc5..ee05c3b8373 100644 --- a/libs/dns-util/src/Wire/Network/DNS/SRV.hs +++ b/libs/dns-util/src/Wire/Network/DNS/SRV.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/dns-util/test/Spec.hs b/libs/dns-util/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/libs/dns-util/test/Spec.hs +++ b/libs/dns-util/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/dns-util/test/Test/Wire/Network/DNS/SRVSpec.hs b/libs/dns-util/test/Test/Wire/Network/DNS/SRVSpec.hs index 39c67a1ee2b..2537c47ea50 100644 --- a/libs/dns-util/test/Test/Wire/Network/DNS/SRVSpec.hs +++ b/libs/dns-util/test/Test/Wire/Network/DNS/SRVSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/extended/src/Options/Applicative/Extended.hs b/libs/extended/src/Options/Applicative/Extended.hs index d5050caf498..588fa9668b0 100644 --- a/libs/extended/src/Options/Applicative/Extended.hs +++ b/libs/extended/src/Options/Applicative/Extended.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/extended/src/Servant/API/Extended.hs b/libs/extended/src/Servant/API/Extended.hs index 90e1a8516fa..7f71777dd77 100644 --- a/libs/extended/src/Servant/API/Extended.hs +++ b/libs/extended/src/Servant/API/Extended.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/extended/src/System/Logger/Extended.hs b/libs/extended/src/System/Logger/Extended.hs index 6bb4cb8ebba..bc24e383502 100644 --- a/libs/extended/src/System/Logger/Extended.hs +++ b/libs/extended/src/System/Logger/Extended.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/extended/test/Spec.hs b/libs/extended/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/libs/extended/test/Spec.hs +++ b/libs/extended/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/extended/test/Test/System/Logger/ExtendedSpec.hs b/libs/extended/test/Test/System/Logger/ExtendedSpec.hs index 315878eaae2..e0af6146975 100644 --- a/libs/extended/test/Test/System/Logger/ExtendedSpec.hs +++ b/libs/extended/test/Test/System/Logger/ExtendedSpec.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.System.Logger.ExtendedSpec where import Data.Aeson ((.=)) diff --git a/libs/galley-types/src/Galley/Types.hs b/libs/galley-types/src/Galley/Types.hs index e9f69bbb43a..018af4ff9ab 100644 --- a/libs/galley-types/src/Galley/Types.hs +++ b/libs/galley-types/src/Galley/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -27,7 +27,7 @@ module Galley.Types cnvType, cnvCreator, cnvAccess, - cnvAccessRole, + cnvAccessRoles, cnvName, cnvTeam, cnvMessageTimer, @@ -55,7 +55,8 @@ module Galley.Types TypingData (..), OtrMessage (..), Access (..), - AccessRole (..), + AccessRoleV2 (..), + AccessRoleLegacy (..), ConversationList (..), ConversationRename (..), ConversationAccessData (..), diff --git a/libs/galley-types/src/Galley/Types/Bot.hs b/libs/galley-types/src/Galley/Types/Bot.hs index 6b434e9d613..f773cbcfd38 100644 --- a/libs/galley-types/src/Galley/Types/Bot.hs +++ b/libs/galley-types/src/Galley/Types/Bot.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Bot/Service.hs b/libs/galley-types/src/Galley/Types/Bot/Service.hs index 5adde1fac7d..752cc212f7c 100644 --- a/libs/galley-types/src/Galley/Types/Bot/Service.hs +++ b/libs/galley-types/src/Galley/Types/Bot/Service.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Conversations/Intra.hs b/libs/galley-types/src/Galley/Types/Conversations/Intra.hs index e41823f3cef..5114a6ef4ca 100644 --- a/libs/galley-types/src/Galley/Types/Conversations/Intra.hs +++ b/libs/galley-types/src/Galley/Types/Conversations/Intra.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Conversations/Members.hs b/libs/galley-types/src/Galley/Types/Conversations/Members.hs index cd172988eb1..063540b6a05 100644 --- a/libs/galley-types/src/Galley/Types/Conversations/Members.hs +++ b/libs/galley-types/src/Galley/Types/Conversations/Members.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Conversations/One2One.hs b/libs/galley-types/src/Galley/Types/Conversations/One2One.hs index bc608b70dab..00a61d2e666 100644 --- a/libs/galley-types/src/Galley/Types/Conversations/One2One.hs +++ b/libs/galley-types/src/Galley/Types/Conversations/One2One.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Conversations/Roles.hs b/libs/galley-types/src/Galley/Types/Conversations/Roles.hs index 8d5667984cc..c33dc0add21 100644 --- a/libs/galley-types/src/Galley/Types/Conversations/Roles.hs +++ b/libs/galley-types/src/Galley/Types/Conversations/Roles.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Teams.hs b/libs/galley-types/src/Galley/Types/Teams.hs index a37bbdc466d..b13fcc67b11 100644 --- a/libs/galley-types/src/Galley/Types/Teams.hs +++ b/libs/galley-types/src/Galley/Types/Teams.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Teams/Intra.hs b/libs/galley-types/src/Galley/Types/Teams/Intra.hs index 8659fdba6a0..a43a538c2b3 100644 --- a/libs/galley-types/src/Galley/Types/Teams/Intra.hs +++ b/libs/galley-types/src/Galley/Types/Teams/Intra.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/src/Galley/Types/Teams/SearchVisibility.hs b/libs/galley-types/src/Galley/Types/Teams/SearchVisibility.hs index 12e2f63a32f..b6292bdf023 100644 --- a/libs/galley-types/src/Galley/Types/Teams/SearchVisibility.hs +++ b/libs/galley-types/src/Galley/Types/Teams/SearchVisibility.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/test/unit/Main.hs b/libs/galley-types/test/unit/Main.hs index 98db9cb0285..70ae6fa4874 100644 --- a/libs/galley-types/test/unit/Main.hs +++ b/libs/galley-types/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/test/unit/Test/Galley/Roundtrip.hs b/libs/galley-types/test/unit/Test/Galley/Roundtrip.hs index 095ca336c14..b9d1fcc8568 100644 --- a/libs/galley-types/test/unit/Test/Galley/Roundtrip.hs +++ b/libs/galley-types/test/unit/Test/Galley/Roundtrip.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/galley-types/test/unit/Test/Galley/Types.hs b/libs/galley-types/test/unit/Test/Galley/Types.hs index e9925f70205..91d766c02dc 100644 --- a/libs/galley-types/test/unit/Test/Galley/Types.hs +++ b/libs/galley-types/test/unit/Test/Galley/Types.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types.hs b/libs/gundeck-types/src/Gundeck/Types.hs index 1213ab6244c..81a24babdaf 100644 --- a/libs/gundeck-types/src/Gundeck/Types.hs +++ b/libs/gundeck-types/src/Gundeck/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/BulkPush.hs b/libs/gundeck-types/src/Gundeck/Types/BulkPush.hs index dd66523e7ea..f117f71435d 100644 --- a/libs/gundeck-types/src/Gundeck/Types/BulkPush.hs +++ b/libs/gundeck-types/src/Gundeck/Types/BulkPush.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Common.hs b/libs/gundeck-types/src/Gundeck/Types/Common.hs index 15b7a511066..fad0df493de 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Common.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Common.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Event.hs b/libs/gundeck-types/src/Gundeck/Types/Event.hs index 34341031d43..72c0f3e9ae6 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Event.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Event.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Notification.hs b/libs/gundeck-types/src/Gundeck/Types/Notification.hs index 9805a6222f6..e23fb0f5983 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Notification.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Notification.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Presence.hs b/libs/gundeck-types/src/Gundeck/Types/Presence.hs index a1e1cb44170..01895b6ccd3 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Presence.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Presence.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Push.hs b/libs/gundeck-types/src/Gundeck/Types/Push.hs index 4213e4c2060..fcd4d6af18c 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Push.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Push.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/gundeck-types/src/Gundeck/Types/Push/V2.hs b/libs/gundeck-types/src/Gundeck/Types/Push/V2.hs index 32581a3fe61..f1b708faddb 100644 --- a/libs/gundeck-types/src/Gundeck/Types/Push/V2.hs +++ b/libs/gundeck-types/src/Gundeck/Types/Push/V2.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/Setup.hs b/libs/hscim/Setup.hs index d382934b989..858d0c9e2d0 100644 --- a/libs/hscim/Setup.hs +++ b/libs/hscim/Setup.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/server/Main.hs b/libs/hscim/server/Main.hs index b0fc53a4d26..adcd58a2b86 100644 --- a/libs/hscim/server/Main.hs +++ b/libs/hscim/server/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/AttrName.hs b/libs/hscim/src/Web/Scim/AttrName.hs index 4c9a48b0ef2..c0bfdf9e13f 100644 --- a/libs/hscim/src/Web/Scim/AttrName.hs +++ b/libs/hscim/src/Web/Scim/AttrName.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema.hs index c9da11b4795..9bced57cc65 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Group.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Group.hs index 4625ceb9863..332333317b5 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Group.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Group.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/ResourceType.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/ResourceType.hs index 7ae4b60c396..949f12c80a2 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/ResourceType.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/ResourceType.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/SPConfig.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/SPConfig.hs index a31d9990929..70a2b69277e 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/SPConfig.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/SPConfig.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Schema.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Schema.hs index d377c33cfb1..81d74694dfd 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Schema.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/Schema.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/User.hs b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/User.hs index 6da74701932..ce3d2916550 100644 --- a/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/User.hs +++ b/libs/hscim/src/Web/Scim/Capabilities/MetaSchema/User.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Class/Auth.hs b/libs/hscim/src/Web/Scim/Class/Auth.hs index 5ac0df0bd35..db1c9a15773 100644 --- a/libs/hscim/src/Web/Scim/Class/Auth.hs +++ b/libs/hscim/src/Web/Scim/Class/Auth.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Class/Group.hs b/libs/hscim/src/Web/Scim/Class/Group.hs index b748b7cb241..3386d19c2d5 100644 --- a/libs/hscim/src/Web/Scim/Class/Group.hs +++ b/libs/hscim/src/Web/Scim/Class/Group.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Class/User.hs b/libs/hscim/src/Web/Scim/Class/User.hs index 68ce1f5ab7e..1d355dc9787 100644 --- a/libs/hscim/src/Web/Scim/Class/User.hs +++ b/libs/hscim/src/Web/Scim/Class/User.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Client.hs b/libs/hscim/src/Web/Scim/Client.hs index 4cf0dfdc505..abbafc62c1e 100644 --- a/libs/hscim/src/Web/Scim/Client.hs +++ b/libs/hscim/src/Web/Scim/Client.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/ContentType.hs b/libs/hscim/src/Web/Scim/ContentType.hs index 60cc857037d..3e9d203c893 100644 --- a/libs/hscim/src/Web/Scim/ContentType.hs +++ b/libs/hscim/src/Web/Scim/ContentType.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Filter.hs b/libs/hscim/src/Web/Scim/Filter.hs index e4d9d0c3c90..46b96e70411 100644 --- a/libs/hscim/src/Web/Scim/Filter.hs +++ b/libs/hscim/src/Web/Scim/Filter.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Handler.hs b/libs/hscim/src/Web/Scim/Handler.hs index 5d559635d00..22133a77121 100644 --- a/libs/hscim/src/Web/Scim/Handler.hs +++ b/libs/hscim/src/Web/Scim/Handler.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/AuthenticationScheme.hs b/libs/hscim/src/Web/Scim/Schema/AuthenticationScheme.hs index 41c3eb07238..05821699a7f 100644 --- a/libs/hscim/src/Web/Scim/Schema/AuthenticationScheme.hs +++ b/libs/hscim/src/Web/Scim/Schema/AuthenticationScheme.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/Common.hs b/libs/hscim/src/Web/Scim/Schema/Common.hs index cca4131239e..13f6e198756 100644 --- a/libs/hscim/src/Web/Scim/Schema/Common.hs +++ b/libs/hscim/src/Web/Scim/Schema/Common.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/Error.hs b/libs/hscim/src/Web/Scim/Schema/Error.hs index 209f4ccbef1..e40be8f541a 100644 --- a/libs/hscim/src/Web/Scim/Schema/Error.hs +++ b/libs/hscim/src/Web/Scim/Schema/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/ListResponse.hs b/libs/hscim/src/Web/Scim/Schema/ListResponse.hs index c71ec94e2fe..a24c5c4daba 100644 --- a/libs/hscim/src/Web/Scim/Schema/ListResponse.hs +++ b/libs/hscim/src/Web/Scim/Schema/ListResponse.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/Meta.hs b/libs/hscim/src/Web/Scim/Schema/Meta.hs index c4d07eec872..3f4dc66dd19 100644 --- a/libs/hscim/src/Web/Scim/Schema/Meta.hs +++ b/libs/hscim/src/Web/Scim/Schema/Meta.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/PatchOp.hs b/libs/hscim/src/Web/Scim/Schema/PatchOp.hs index 4353726910c..49ceffae336 100644 --- a/libs/hscim/src/Web/Scim/Schema/PatchOp.hs +++ b/libs/hscim/src/Web/Scim/Schema/PatchOp.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/ResourceType.hs b/libs/hscim/src/Web/Scim/Schema/ResourceType.hs index 06eba367b6e..e7bf97d2b8c 100644 --- a/libs/hscim/src/Web/Scim/Schema/ResourceType.hs +++ b/libs/hscim/src/Web/Scim/Schema/ResourceType.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/Schema.hs b/libs/hscim/src/Web/Scim/Schema/Schema.hs index e875faf4a76..d7ae67016cd 100644 --- a/libs/hscim/src/Web/Scim/Schema/Schema.hs +++ b/libs/hscim/src/Web/Scim/Schema/Schema.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User.hs b/libs/hscim/src/Web/Scim/Schema/User.hs index 659cff77c81..1e2a8c96dc4 100644 --- a/libs/hscim/src/Web/Scim/Schema/User.hs +++ b/libs/hscim/src/Web/Scim/Schema/User.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Address.hs b/libs/hscim/src/Web/Scim/Schema/User/Address.hs index 0d33a06a721..13ec42a97d2 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Address.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Address.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Certificate.hs b/libs/hscim/src/Web/Scim/Schema/User/Certificate.hs index fb6a70c47fb..4c3099e1438 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Certificate.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Certificate.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Email.hs b/libs/hscim/src/Web/Scim/Schema/User/Email.hs index 3d4a5516938..f48196fc7e5 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Email.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Email.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/IM.hs b/libs/hscim/src/Web/Scim/Schema/User/IM.hs index 988733a6892..4d616128831 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/IM.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/IM.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Name.hs b/libs/hscim/src/Web/Scim/Schema/User/Name.hs index 9d3d5e263cb..32197a56b63 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Name.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Name.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Phone.hs b/libs/hscim/src/Web/Scim/Schema/User/Phone.hs index f317b4f3ccb..b5ab9eb93f5 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Phone.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Phone.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/User/Photo.hs b/libs/hscim/src/Web/Scim/Schema/User/Photo.hs index 88fd84c9b26..7c1971e813b 100644 --- a/libs/hscim/src/Web/Scim/Schema/User/Photo.hs +++ b/libs/hscim/src/Web/Scim/Schema/User/Photo.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Schema/UserTypes.hs b/libs/hscim/src/Web/Scim/Schema/UserTypes.hs index 2e5517e2ade..904955cc7e4 100644 --- a/libs/hscim/src/Web/Scim/Schema/UserTypes.hs +++ b/libs/hscim/src/Web/Scim/Schema/UserTypes.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Server.hs b/libs/hscim/src/Web/Scim/Server.hs index 4ee886ffd5c..9b3fe16beda 100644 --- a/libs/hscim/src/Web/Scim/Server.hs +++ b/libs/hscim/src/Web/Scim/Server.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Server/Mock.hs b/libs/hscim/src/Web/Scim/Server/Mock.hs index 6d46030cacc..d92adc109f6 100644 --- a/libs/hscim/src/Web/Scim/Server/Mock.hs +++ b/libs/hscim/src/Web/Scim/Server/Mock.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Test/Acceptance.hs b/libs/hscim/src/Web/Scim/Test/Acceptance.hs index fff748acbbe..12e165375df 100644 --- a/libs/hscim/src/Web/Scim/Test/Acceptance.hs +++ b/libs/hscim/src/Web/Scim/Test/Acceptance.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/src/Web/Scim/Test/Util.hs b/libs/hscim/src/Web/Scim/Test/Util.hs index 9234eee6953..bd2d2d71392 100644 --- a/libs/hscim/src/Web/Scim/Test/Util.hs +++ b/libs/hscim/src/Web/Scim/Test/Util.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Spec.hs b/libs/hscim/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/libs/hscim/test/Spec.hs +++ b/libs/hscim/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/AcceptanceSpec.hs b/libs/hscim/test/Test/AcceptanceSpec.hs index 0594a979fb4..cb4d2608e78 100644 --- a/libs/hscim/test/Test/AcceptanceSpec.hs +++ b/libs/hscim/test/Test/AcceptanceSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Capabilities/MetaSchemaSpec.hs b/libs/hscim/test/Test/Capabilities/MetaSchemaSpec.hs index 059a99d2f00..bff1aa4068a 100644 --- a/libs/hscim/test/Test/Capabilities/MetaSchemaSpec.hs +++ b/libs/hscim/test/Test/Capabilities/MetaSchemaSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Class/AuthSpec.hs b/libs/hscim/test/Test/Class/AuthSpec.hs index 4e779bc13cd..65c25234167 100644 --- a/libs/hscim/test/Test/Class/AuthSpec.hs +++ b/libs/hscim/test/Test/Class/AuthSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Class/GroupSpec.hs b/libs/hscim/test/Test/Class/GroupSpec.hs index f2eae2c7998..7d3a472854b 100644 --- a/libs/hscim/test/Test/Class/GroupSpec.hs +++ b/libs/hscim/test/Test/Class/GroupSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Class/UserSpec.hs b/libs/hscim/test/Test/Class/UserSpec.hs index 99995b1081b..deebc048406 100644 --- a/libs/hscim/test/Test/Class/UserSpec.hs +++ b/libs/hscim/test/Test/Class/UserSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/FilterSpec.hs b/libs/hscim/test/Test/FilterSpec.hs index 102fa11063d..ceda7d25a9a 100644 --- a/libs/hscim/test/Test/FilterSpec.hs +++ b/libs/hscim/test/Test/FilterSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/MiscSpec.hs b/libs/hscim/test/Test/MiscSpec.hs index 243fb1bfbe5..f14d51483c3 100644 --- a/libs/hscim/test/Test/MiscSpec.hs +++ b/libs/hscim/test/Test/MiscSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/AuthenticationSchemeSpec.hs b/libs/hscim/test/Test/Schema/AuthenticationSchemeSpec.hs index 0501c6e6463..cdd465c1933 100644 --- a/libs/hscim/test/Test/Schema/AuthenticationSchemeSpec.hs +++ b/libs/hscim/test/Test/Schema/AuthenticationSchemeSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/GroupSpec.hs b/libs/hscim/test/Test/Schema/GroupSpec.hs index aa7341c23ac..bc7b02a953c 100644 --- a/libs/hscim/test/Test/Schema/GroupSpec.hs +++ b/libs/hscim/test/Test/Schema/GroupSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/MetaSchemaSpec.hs b/libs/hscim/test/Test/Schema/MetaSchemaSpec.hs index 1649622df37..efe71fcca6d 100644 --- a/libs/hscim/test/Test/Schema/MetaSchemaSpec.hs +++ b/libs/hscim/test/Test/Schema/MetaSchemaSpec.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/PatchOpSpec.hs b/libs/hscim/test/Test/Schema/PatchOpSpec.hs index e51820597d9..78d2598faee 100644 --- a/libs/hscim/test/Test/Schema/PatchOpSpec.hs +++ b/libs/hscim/test/Test/Schema/PatchOpSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/ResourceSpec.hs b/libs/hscim/test/Test/Schema/ResourceSpec.hs index da7cf7350ec..d699201ff9c 100644 --- a/libs/hscim/test/Test/Schema/ResourceSpec.hs +++ b/libs/hscim/test/Test/Schema/ResourceSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/UserSpec.hs b/libs/hscim/test/Test/Schema/UserSpec.hs index 6c8fd374bfd..b28ab428c55 100644 --- a/libs/hscim/test/Test/Schema/UserSpec.hs +++ b/libs/hscim/test/Test/Schema/UserSpec.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/hscim/test/Test/Schema/Util.hs b/libs/hscim/test/Test/Schema/Util.hs index eb321b2dbb7..47a533d0c27 100644 --- a/libs/hscim/test/Test/Schema/Util.hs +++ b/libs/hscim/test/Test/Schema/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/imports/src/Imports.hs b/libs/imports/src/Imports.hs index 05eed16c996..81e583b880b 100644 --- a/libs/imports/src/Imports.hs +++ b/libs/imports/src/Imports.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth-c/src/lib.rs b/libs/libzauth/libzauth-c/src/lib.rs index be8bb949fac..a2d3d73785f 100644 --- a/libs/libzauth/libzauth-c/src/lib.rs +++ b/libs/libzauth/libzauth-c/src/lib.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/examples/verify.rs b/libs/libzauth/libzauth/examples/verify.rs index 19d256bb0b4..70619b410c8 100644 --- a/libs/libzauth/libzauth/examples/verify.rs +++ b/libs/libzauth/libzauth/examples/verify.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/src/acl.rs b/libs/libzauth/libzauth/src/acl.rs index 65f6910ad5c..36bfbb724b2 100644 --- a/libs/libzauth/libzauth/src/acl.rs +++ b/libs/libzauth/libzauth/src/acl.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/src/error.rs b/libs/libzauth/libzauth/src/error.rs index 45ee5ad0b30..be06eecae8d 100644 --- a/libs/libzauth/libzauth/src/error.rs +++ b/libs/libzauth/libzauth/src/error.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/src/lib.rs b/libs/libzauth/libzauth/src/lib.rs index e7243089edc..192fa31b6f9 100644 --- a/libs/libzauth/libzauth/src/lib.rs +++ b/libs/libzauth/libzauth/src/lib.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/src/tree.rs b/libs/libzauth/libzauth/src/tree.rs index 98c82bd517f..2a55075e0fa 100644 --- a/libs/libzauth/libzauth/src/tree.rs +++ b/libs/libzauth/libzauth/src/tree.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/libzauth/libzauth/src/zauth.rs b/libs/libzauth/libzauth/src/zauth.rs index af0bf5c5397..ffa184001a0 100644 --- a/libs/libzauth/libzauth/src/zauth.rs +++ b/libs/libzauth/libzauth/src/zauth.rs @@ -1,6 +1,6 @@ // This file is part of the Wire Server implementation. // -// Copyright (C) 2020 Wire Swiss GmbH +// Copyright (C) 2022 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-core/src/Data/Metrics.hs b/libs/metrics-core/src/Data/Metrics.hs index ab3f6d41e2b..85ef0048451 100644 --- a/libs/metrics-core/src/Data/Metrics.hs +++ b/libs/metrics-core/src/Data/Metrics.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-core/src/Data/Metrics/GC.hs b/libs/metrics-core/src/Data/Metrics/GC.hs index adc3b37703c..88b907badb0 100644 --- a/libs/metrics-core/src/Data/Metrics/GC.hs +++ b/libs/metrics-core/src/Data/Metrics/GC.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/Middleware.hs b/libs/metrics-wai/src/Data/Metrics/Middleware.hs index 88dd3a81d20..43c6d682017 100644 --- a/libs/metrics-wai/src/Data/Metrics/Middleware.hs +++ b/libs/metrics-wai/src/Data/Metrics/Middleware.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/Middleware/Prometheus.hs b/libs/metrics-wai/src/Data/Metrics/Middleware/Prometheus.hs index d8f5aed55a7..aa7fd30dd64 100644 --- a/libs/metrics-wai/src/Data/Metrics/Middleware/Prometheus.hs +++ b/libs/metrics-wai/src/Data/Metrics/Middleware/Prometheus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/Servant.hs b/libs/metrics-wai/src/Data/Metrics/Servant.hs index eadfcf50164..6f12519e283 100644 --- a/libs/metrics-wai/src/Data/Metrics/Servant.hs +++ b/libs/metrics-wai/src/Data/Metrics/Servant.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/Test.hs b/libs/metrics-wai/src/Data/Metrics/Test.hs index aca25a24b32..e7e34363ee5 100644 --- a/libs/metrics-wai/src/Data/Metrics/Test.hs +++ b/libs/metrics-wai/src/Data/Metrics/Test.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/Types.hs b/libs/metrics-wai/src/Data/Metrics/Types.hs index ecca08a2907..ca2557a3680 100644 --- a/libs/metrics-wai/src/Data/Metrics/Types.hs +++ b/libs/metrics-wai/src/Data/Metrics/Types.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/src/Data/Metrics/WaiRoute.hs b/libs/metrics-wai/src/Data/Metrics/WaiRoute.hs index a6803bf94cf..92b953d377b 100644 --- a/libs/metrics-wai/src/Data/Metrics/WaiRoute.hs +++ b/libs/metrics-wai/src/Data/Metrics/WaiRoute.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/test/Spec.hs b/libs/metrics-wai/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/libs/metrics-wai/test/Spec.hs +++ b/libs/metrics-wai/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/metrics-wai/test/Test/Data/Metrics/TypesSpec.hs b/libs/metrics-wai/test/Test/Data/Metrics/TypesSpec.hs index 8220462c70f..9abc4ed4930 100644 --- a/libs/metrics-wai/test/Test/Data/Metrics/TypesSpec.hs +++ b/libs/metrics-wai/test/Test/Data/Metrics/TypesSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs b/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs index 0f20dcf536d..8c5f5d06b49 100644 --- a/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs +++ b/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/ropes/src/Ropes/Nexmo.hs b/libs/ropes/src/Ropes/Nexmo.hs index 7ec1e976432..1de3ec41ad7 100644 --- a/libs/ropes/src/Ropes/Nexmo.hs +++ b/libs/ropes/src/Ropes/Nexmo.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/ropes/src/Ropes/Twilio.hs b/libs/ropes/src/Ropes/Twilio.hs index 6f7ac50fe2c..eefbf53226a 100644 --- a/libs/ropes/src/Ropes/Twilio.hs +++ b/libs/ropes/src/Ropes/Twilio.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/schema-profunctor/src/Data/Schema.hs b/libs/schema-profunctor/src/Data/Schema.hs index 0e8c5e8cacb..63af0cd2410 100644 --- a/libs/schema-profunctor/src/Data/Schema.hs +++ b/libs/schema-profunctor/src/Data/Schema.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/schema-profunctor/test/unit/Main.hs b/libs/schema-profunctor/test/unit/Main.hs index 2ab098b30bc..fab93225c69 100644 --- a/libs/schema-profunctor/test/unit/Main.hs +++ b/libs/schema-profunctor/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/schema-profunctor/test/unit/Test/Data/Schema.hs b/libs/schema-profunctor/test/unit/Test/Data/Schema.hs index 484f9fb413b..912ad0ef621 100644 --- a/libs/schema-profunctor/test/unit/Test/Data/Schema.hs +++ b/libs/schema-profunctor/test/unit/Test/Data/Schema.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/sodium-crypto-sign/src/Sodium/Crypto/Sign.hsc b/libs/sodium-crypto-sign/src/Sodium/Crypto/Sign.hsc index 4691ed18831..0d57b5e1f55 100644 --- a/libs/sodium-crypto-sign/src/Sodium/Crypto/Sign.hsc +++ b/libs/sodium-crypto-sign/src/Sodium/Crypto/Sign.hsc @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/ssl-util/src/Ssl/Util.hs b/libs/ssl-util/src/Ssl/Util.hs index 40aa869b657..5fc17fc3da6 100644 --- a/libs/ssl-util/src/Ssl/Util.hs +++ b/libs/ssl-util/src/Ssl/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/tasty-cannon/src/Test/Tasty/Cannon.hs b/libs/tasty-cannon/src/Test/Tasty/Cannon.hs index 9838ed2ccf2..f03e486be66 100644 --- a/libs/tasty-cannon/src/Test/Tasty/Cannon.hs +++ b/libs/tasty-cannon/src/Test/Tasty/Cannon.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common-aws/src/Util/Test/SQS.hs b/libs/types-common-aws/src/Util/Test/SQS.hs index d19edb7ac97..e1b00cb89a9 100644 --- a/libs/types-common-aws/src/Util/Test/SQS.hs +++ b/libs/types-common-aws/src/Util/Test/SQS.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common-journal/Setup.hs b/libs/types-common-journal/Setup.hs index 46b099dae61..ea73b8bd65d 100644 --- a/libs/types-common-journal/Setup.hs +++ b/libs/types-common-journal/Setup.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common-journal/src/Data/Proto.hs b/libs/types-common-journal/src/Data/Proto.hs index b3445805dd0..b0a7de0c4b8 100644 --- a/libs/types-common-journal/src/Data/Proto.hs +++ b/libs/types-common-journal/src/Data/Proto.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common-journal/src/Data/Proto/Id.hs b/libs/types-common-journal/src/Data/Proto/Id.hs index 4b11182e9bc..5c3a44e2683 100644 --- a/libs/types-common-journal/src/Data/Proto/Id.hs +++ b/libs/types-common-journal/src/Data/Proto/Id.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Code.hs b/libs/types-common/src/Data/Code.hs index 2e831444ec2..549f8849912 100644 --- a/libs/types-common/src/Data/Code.hs +++ b/libs/types-common/src/Data/Code.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/CommaSeparatedList.hs b/libs/types-common/src/Data/CommaSeparatedList.hs index 4346769a131..4225dcedf04 100644 --- a/libs/types-common/src/Data/CommaSeparatedList.hs +++ b/libs/types-common/src/Data/CommaSeparatedList.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Domain.hs b/libs/types-common/src/Data/Domain.hs index ecbac67e280..5a5d346a8bb 100644 --- a/libs/types-common/src/Data/Domain.hs +++ b/libs/types-common/src/Data/Domain.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/ETag.hs b/libs/types-common/src/Data/ETag.hs index 1260837cf96..3cdd7bb07fe 100644 --- a/libs/types-common/src/Data/ETag.hs +++ b/libs/types-common/src/Data/ETag.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Handle.hs b/libs/types-common/src/Data/Handle.hs index d645cfb3c67..ef9e8d238b5 100644 --- a/libs/types-common/src/Data/Handle.hs +++ b/libs/types-common/src/Data/Handle.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Id.hs b/libs/types-common/src/Data/Id.hs index 44df9477eb8..229dc77c2d7 100644 --- a/libs/types-common/src/Data/Id.hs +++ b/libs/types-common/src/Data/Id.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Json/Util.hs b/libs/types-common/src/Data/Json/Util.hs index bed1399f7fb..20116936bf1 100644 --- a/libs/types-common/src/Data/Json/Util.hs +++ b/libs/types-common/src/Data/Json/Util.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/LegalHold.hs b/libs/types-common/src/Data/LegalHold.hs index 0e8bd7c9e56..dfc60764b5e 100644 --- a/libs/types-common/src/Data/LegalHold.hs +++ b/libs/types-common/src/Data/LegalHold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/List1.hs b/libs/types-common/src/Data/List1.hs index 3cefeaa6aa0..a7299123956 100644 --- a/libs/types-common/src/Data/List1.hs +++ b/libs/types-common/src/Data/List1.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Misc.hs b/libs/types-common/src/Data/Misc.hs index 2f731095dda..bc91312f392 100644 --- a/libs/types-common/src/Data/Misc.hs +++ b/libs/types-common/src/Data/Misc.hs @@ -9,7 +9,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Qualified.hs b/libs/types-common/src/Data/Qualified.hs index fb89c8e86bb..4621312a472 100644 --- a/libs/types-common/src/Data/Qualified.hs +++ b/libs/types-common/src/Data/Qualified.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Range.hs b/libs/types-common/src/Data/Range.hs index 6eb80f5de71..5589004e35c 100644 --- a/libs/types-common/src/Data/Range.hs +++ b/libs/types-common/src/Data/Range.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/SizedHashMap.hs b/libs/types-common/src/Data/SizedHashMap.hs index 49c3c0553ef..d11e54efa2f 100644 --- a/libs/types-common/src/Data/SizedHashMap.hs +++ b/libs/types-common/src/Data/SizedHashMap.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/Text/Ascii.hs b/libs/types-common/src/Data/Text/Ascii.hs index 9edd77b13cb..bfed097a382 100644 --- a/libs/types-common/src/Data/Text/Ascii.hs +++ b/libs/types-common/src/Data/Text/Ascii.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Data/UUID/Tagged.hs b/libs/types-common/src/Data/UUID/Tagged.hs index e3552f0b0ba..efc22fde86d 100644 --- a/libs/types-common/src/Data/UUID/Tagged.hs +++ b/libs/types-common/src/Data/UUID/Tagged.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Util/Attoparsec.hs b/libs/types-common/src/Util/Attoparsec.hs index d4d8867182f..f3456f34271 100644 --- a/libs/types-common/src/Util/Attoparsec.hs +++ b/libs/types-common/src/Util/Attoparsec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Util/Logging.hs b/libs/types-common/src/Util/Logging.hs index d06a36c89c8..1e33619bf3f 100644 --- a/libs/types-common/src/Util/Logging.hs +++ b/libs/types-common/src/Util/Logging.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Util/Options.hs b/libs/types-common/src/Util/Options.hs index 1897caa8e69..95d269110af 100644 --- a/libs/types-common/src/Util/Options.hs +++ b/libs/types-common/src/Util/Options.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Util/Options/Common.hs b/libs/types-common/src/Util/Options/Common.hs index 5dab5282134..13e52e51977 100644 --- a/libs/types-common/src/Util/Options/Common.hs +++ b/libs/types-common/src/Util/Options/Common.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Util/Test.hs b/libs/types-common/src/Util/Test.hs index 69b5d8deb6a..f774c58117d 100644 --- a/libs/types-common/src/Util/Test.hs +++ b/libs/types-common/src/Util/Test.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/src/Wire/Swagger.hs b/libs/types-common/src/Wire/Swagger.hs index 6540c7afebd..1701feb9d12 100644 --- a/libs/types-common/src/Wire/Swagger.hs +++ b/libs/types-common/src/Wire/Swagger.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Main.hs b/libs/types-common/test/Main.hs index eb5d81b7d2e..061294564bb 100644 --- a/libs/types-common/test/Main.hs +++ b/libs/types-common/test/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Test/Domain.hs b/libs/types-common/test/Test/Domain.hs index ea5f59501e2..72caec8b1f4 100644 --- a/libs/types-common/test/Test/Domain.hs +++ b/libs/types-common/test/Test/Domain.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Test/Handle.hs b/libs/types-common/test/Test/Handle.hs index 7b15228fa82..fa8b70e4191 100644 --- a/libs/types-common/test/Test/Handle.hs +++ b/libs/types-common/test/Test/Handle.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Test/Properties.hs b/libs/types-common/test/Test/Properties.hs index 31edd835b9c..cecb0794dd9 100644 --- a/libs/types-common/test/Test/Properties.hs +++ b/libs/types-common/test/Test/Properties.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Test/Qualified.hs b/libs/types-common/test/Test/Qualified.hs index 1787d475a99..6b548eb2974 100644 --- a/libs/types-common/test/Test/Qualified.hs +++ b/libs/types-common/test/Test/Qualified.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/types-common/test/Test/SizedHashMap.hs b/libs/types-common/test/Test/SizedHashMap.hs index 46d049f0f56..3156a9e6088 100644 --- a/libs/types-common/test/Test/SizedHashMap.hs +++ b/libs/types-common/test/Test/SizedHashMap.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities.hs b/libs/wai-utilities/src/Network/Wai/Utilities.hs index 7e0e9c5eab3..ebc1833751a 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/Error.hs b/libs/wai-utilities/src/Network/Wai/Utilities/Error.hs index 661b6618646..bd8f127c44e 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/Error.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/Error.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/Request.hs b/libs/wai-utilities/src/Network/Wai/Utilities/Request.hs index 1f969d3447c..c07d29782ae 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/Request.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/Request.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/Response.hs b/libs/wai-utilities/src/Network/Wai/Utilities/Response.hs index d3e2e9b2e7a..c15d2264a3d 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/Response.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/Response.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/Server.hs b/libs/wai-utilities/src/Network/Wai/Utilities/Server.hs index 88deb69274b..4185cc484ba 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/Server.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/Server.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/Swagger.hs b/libs/wai-utilities/src/Network/Wai/Utilities/Swagger.hs index 8cebc1e84c3..a4215845396 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/Swagger.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/Swagger.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wai-utilities/src/Network/Wai/Utilities/ZAuth.hs b/libs/wai-utilities/src/Network/Wai/Utilities/ZAuth.hs index bc1125259b9..14f2fc7a92e 100644 --- a/libs/wai-utilities/src/Network/Wai/Utilities/ZAuth.hs +++ b/libs/wai-utilities/src/Network/Wai/Utilities/ZAuth.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/API.hs b/libs/wire-api-federation/src/Wire/API/Federation/API.hs index 719af7baca0..1f5b82103b1 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/API.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/API/Brig.hs b/libs/wire-api-federation/src/Wire/API/Federation/API/Brig.hs index 3c90019f9f9..08b134a13b6 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/API/Brig.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/API/Brig.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/API/Cargohold.hs b/libs/wire-api-federation/src/Wire/API/Federation/API/Cargohold.hs index 44a3e022b7f..f4da5333664 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/API/Cargohold.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/API/Cargohold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/API/Common.hs b/libs/wire-api-federation/src/Wire/API/Federation/API/Common.hs index 0df3432e3f6..ebc038f58f3 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/API/Common.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/API/Common.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs b/libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs index 85862695ceb..e461862c980 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -29,7 +29,7 @@ import Servant.API import Wire.API.Arbitrary (Arbitrary, GenericUniform (..)) import Wire.API.Conversation ( Access, - AccessRole, + AccessRoleV2, ConvType, ConversationMetadata, ReceiptMode, @@ -118,7 +118,7 @@ data NewRemoteConversation conv = NewRemoteConversation -- | The conversation type rcCnvType :: ConvType, rcCnvAccess :: [Access], - rcCnvAccessRole :: AccessRole, + rcCnvAccessRoles :: Set AccessRoleV2, -- | The conversation name, rcCnvName :: Maybe Text, -- | Members of the conversation apart from the creator diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Client.hs b/libs/wire-api-federation/src/Wire/API/Federation/Client.hs index 4dae263caf3..04e6e5f999e 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Client.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Client.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Component.hs b/libs/wire-api-federation/src/Wire/API/Federation/Component.hs index 9f8c0acaf9a..075a5aa9007 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Component.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Component.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Domain.hs b/libs/wire-api-federation/src/Wire/API/Federation/Domain.hs index ce7038be62e..a391afd8be7 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Domain.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Domain.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Error.hs b/libs/wire-api-federation/src/Wire/API/Federation/Error.hs index 0229727eeec..87781ff3880 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Error.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Event.hs b/libs/wire-api-federation/src/Wire/API/Federation/Event.hs index fd1707b9c3d..2e62292524e 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Event.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Event.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Spec.hs b/libs/wire-api-federation/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/libs/wire-api-federation/test/Spec.hs +++ b/libs/wire-api-federation/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/API/BrigSpec.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/API/BrigSpec.hs index 5f75bf5d994..90031646ea8 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/API/BrigSpec.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/API/BrigSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/ConversationUpdate.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/ConversationUpdate.hs index e73413673e8..45c87050e15 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/ConversationUpdate.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/ConversationUpdate.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/GoldenSpec.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/GoldenSpec.hs index 0c292d0756d..87830a46238 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/GoldenSpec.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/GoldenSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationRequest.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationRequest.hs index 4381e330e7d..67093ad3e65 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationRequest.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationRequest.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationResponse.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationResponse.hs index 28044c95f62..05137a27136 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationResponse.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/LeaveConversationResponse.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Federation.Golden.LeaveConversationResponse where import Imports diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/MessageSendResponse.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/MessageSendResponse.hs index abf1b572b83..8bb06e248f9 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/MessageSendResponse.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/MessageSendResponse.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionRequest.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionRequest.hs index 07a4d0306f2..4f617baefad 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionRequest.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionRequest.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionResponse.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionResponse.hs index 23c8833459a..b7b0d7e0baa 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionResponse.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewConnectionResponse.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewRemoteConversation.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewRemoteConversation.hs index 9fcb503ea5c..bb6484d795f 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewRemoteConversation.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/NewRemoteConversation.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Federation.Golden.NewRemoteConversation where import Data.Domain @@ -20,7 +37,7 @@ testObject_NewRemoteConversation1 = rcCnvId = Id (fromJust (UUID.fromString "d13dbe58-d4e3-450f-9c0c-1e632f548740")), rcCnvType = RegularConv, rcCnvAccess = [InviteAccess, CodeAccess], - rcCnvAccessRole = ActivatedAccessRole, + rcCnvAccessRoles = Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole], rcCnvName = Just "gossip", rcNonCreatorMembers = Set.fromList @@ -59,7 +76,7 @@ testObject_NewRemoteConversation2 = rcCnvId = Id (fromJust (UUID.fromString "d13dbe58-d4e3-450f-9c0c-1e632f548740")), rcCnvType = One2OneConv, rcCnvAccess = [], - rcCnvAccessRole = ActivatedAccessRole, + rcCnvAccessRoles = Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole], rcCnvName = Nothing, rcNonCreatorMembers = Set.fromList [], rcMessageTimer = Nothing, diff --git a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/Runner.hs b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/Runner.hs index baeefa6d768..44bc77ceff1 100644 --- a/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/Runner.hs +++ b/libs/wire-api-federation/test/Test/Wire/API/Federation/Golden/Runner.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation1.json b/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation1.json index f1716f8bb18..1db7dd91ea0 100644 --- a/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation1.json +++ b/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation1.json @@ -29,7 +29,10 @@ "id": "6801e49b-918c-4eef-baed-f18522152fca" } ], - "cnv_access_role": "activated", + "cnv_access_roles": [ + "team_member", + "non_team_member" + ], "cnv_type": 0, "receipt_mode": 42, "message_timer": 1000, diff --git a/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation2.json b/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation2.json index bb4bcfc7550..338bca1e147 100644 --- a/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation2.json +++ b/libs/wire-api-federation/test/golden/testObject_NewRemoteConversation2.json @@ -3,7 +3,10 @@ "time": "1864-04-12T12:22:43.673Z", "cnv_access": [], "non_creator_members": [], - "cnv_access_role": "activated", + "cnv_access_roles": [ + "team_member", + "non_team_member" + ], "cnv_type": 2, "receipt_mode": null, "message_timer": null, diff --git a/libs/wire-api/src/Wire/API/Arbitrary.hs b/libs/wire-api/src/Wire/API/Arbitrary.hs index 70ca21c7510..d40e1212b1c 100644 --- a/libs/wire-api/src/Wire/API/Arbitrary.hs +++ b/libs/wire-api/src/Wire/API/Arbitrary.hs @@ -1,12 +1,11 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE KindSignatures #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Asset.hs b/libs/wire-api/src/Wire/API/Asset.hs index 49044a4e150..a1c37b9c5cf 100644 --- a/libs/wire-api/src/Wire/API/Asset.hs +++ b/libs/wire-api/src/Wire/API/Asset.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Call/Config.hs b/libs/wire-api/src/Wire/API/Call/Config.hs index 2a68c3025f7..5e54adefe81 100644 --- a/libs/wire-api/src/Wire/API/Call/Config.hs +++ b/libs/wire-api/src/Wire/API/Call/Config.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Connection.hs b/libs/wire-api/src/Wire/API/Connection.hs index 53fa98758a4..9d07c72dc17 100644 --- a/libs/wire-api/src/Wire/API/Connection.hs +++ b/libs/wire-api/src/Wire/API/Connection.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Conversation.hs b/libs/wire-api/src/Wire/API/Conversation.hs index 36f6cc93dcc..976fcaeb8a6 100644 --- a/libs/wire-api/src/Wire/API/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Conversation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -24,15 +24,14 @@ module Wire.API.Conversation ( -- * Conversation ConversationMetadata (..), Conversation (..), - mkConversation, cnvType, cnvCreator, cnvAccess, - cnvAccessRole, cnvName, cnvTeam, cnvMessageTimer, cnvReceiptMode, + cnvAccessRoles, ConversationCoverView (..), ConversationList (..), ListConversations (..), @@ -46,9 +45,14 @@ module Wire.API.Conversation -- * Conversation properties Access (..), - AccessRole (..), + AccessRoleV2 (..), + AccessRoleLegacy (..), ConvType (..), ReceiptMode (..), + fromAccessRoleLegacy, + toAccessRoleLegacy, + defRole, + maybeRole, -- * create NewConv (..), @@ -90,7 +94,6 @@ import Control.Applicative import Control.Lens (at, (?~)) import Data.Aeson (FromJSON (..), ToJSON (..)) import qualified Data.Aeson as A -import qualified Data.Aeson.Types as A import Data.Id import Data.List.NonEmpty (NonEmpty) import Data.List1 @@ -118,7 +121,7 @@ data ConversationMetadata = ConversationMetadata -- FUTUREWORK: Make this a qualified user ID. cnvmCreator :: UserId, cnvmAccess :: [Access], - cnvmAccessRole :: AccessRole, + cnvmAccessRoles :: Set AccessRoleV2, cnvmName :: Maybe Text, -- FUTUREWORK: Think if it makes sense to make the team ID qualified due to -- federation. @@ -130,13 +133,32 @@ data ConversationMetadata = ConversationMetadata deriving (Arbitrary) via (GenericUniform ConversationMetadata) deriving (FromJSON, ToJSON) via Schema ConversationMetadata -conversationMetadataObjectSchema :: - SchemaP - SwaggerDoc - A.Object - [A.Pair] - ConversationMetadata - ConversationMetadata +accessRolesSchema :: ObjectSchema SwaggerDoc (Set AccessRoleV2) +accessRolesSchema = toOutput .= accessRolesSchemaTuple `withParser` validate + where + toOutput accessRoles = (Just $ toAccessRoleLegacy accessRoles, Just accessRoles) + validate = + \case + (_, Just v2) -> pure v2 + (Just legacy, Nothing) -> pure $ fromAccessRoleLegacy legacy + (Nothing, Nothing) -> fail "access_role|access_role_v2" + +accessRolesSchemaOpt :: ObjectSchema SwaggerDoc (Maybe (Set AccessRoleV2)) +accessRolesSchemaOpt = toOutput .= accessRolesSchemaTuple `withParser` validate + where + toOutput accessRoles = (toAccessRoleLegacy <$> accessRoles, accessRoles) + validate = + \case + (_, Just v2) -> pure $ Just v2 + (Just legacy, Nothing) -> pure $ Just (fromAccessRoleLegacy legacy) + (Nothing, Nothing) -> pure Nothing + +accessRolesSchemaTuple :: ObjectSchema SwaggerDoc (Maybe AccessRoleLegacy, Maybe (Set AccessRoleV2)) +accessRolesSchemaTuple = + (,) <$> fst .= optField "access_role" (maybeWithDefault A.Null schema) + <*> snd .= optField "access_role_v2" (maybeWithDefault A.Null $ set schema) + +conversationMetadataObjectSchema :: ObjectSchema SwaggerDoc ConversationMetadata conversationMetadataObjectSchema = ConversationMetadata <$> cnvmType .= field "type" schema @@ -146,18 +168,17 @@ conversationMetadataObjectSchema = (description ?~ "The creator's user ID") schema <*> cnvmAccess .= field "access" (array schema) - <*> cnvmAccessRole .= field "access_role" schema + <*> cnvmAccessRoles .= accessRolesSchema <*> cnvmName .= optField "name" (maybeWithDefault A.Null schema) <* const ("0.0" :: Text) .= optional (field "last_event" schema) <* const ("1970-01-01T00:00:00.000Z" :: Text) .= optional (field "last_event_time" schema) <*> cnvmTeam .= optField "team" (maybeWithDefault A.Null schema) <*> cnvmMessageTimer - .= ( optFieldWithDocModifier - "message_timer" - (description ?~ "Per-conversation message timer (can be null)") - (maybeWithDefault A.Null schema) - ) + .= optFieldWithDocModifier + "message_timer" + (description ?~ "Per-conversation message timer (can be null)") + (maybeWithDefault A.Null schema) <*> cnvmReceiptMode .= optField "receipt_mode" (maybeWithDefault A.Null schema) instance ToSchema ConversationMetadata where @@ -178,21 +199,6 @@ data Conversation = Conversation deriving (Arbitrary) via (GenericUniform Conversation) deriving (FromJSON, ToJSON, S.ToSchema) via Schema Conversation -mkConversation :: - Qualified ConvId -> - ConvType -> - UserId -> - [Access] -> - AccessRole -> - Maybe Text -> - ConvMembers -> - Maybe TeamId -> - Maybe Milliseconds -> - Maybe ReceiptMode -> - Conversation -mkConversation qid ty uid acc role name mems tid ms rm = - Conversation qid (ConversationMetadata ty uid acc role name tid ms rm) mems - cnvType :: Conversation -> ConvType cnvType = cnvmType . cnvMetadata @@ -202,8 +208,8 @@ cnvCreator = cnvmCreator . cnvMetadata cnvAccess :: Conversation -> [Access] cnvAccess = cnvmAccess . cnvMetadata -cnvAccessRole :: Conversation -> AccessRole -cnvAccessRole = cnvmAccessRole . cnvMetadata +cnvAccessRoles :: Conversation -> Set AccessRoleV2 +cnvAccessRoles = cnvmAccessRoles . cnvMetadata cnvName :: Conversation -> Maybe Text cnvName = cnvmName . cnvMetadata @@ -421,31 +427,108 @@ typeAccess = Doc.string . Doc.enum $ cs . A.encode <$> [(minBound :: Access) ..] -- | AccessRoles define who can join conversations. The roles are -- "supersets", i.e. Activated includes Team and NonActivated includes -- Activated. -data AccessRole +data AccessRoleLegacy = -- | Nobody can be invited to this conversation -- (e.g. it's a 1:1 conversation) PrivateAccessRole | -- | Team-only conversation TeamAccessRole | -- | Conversation for users who have activated - -- email or phone + -- email, phone or SSO and bots ActivatedAccessRole | -- | No checks NonActivatedAccessRole + deriving stock (Eq, Ord, Show, Generic, Enum, Bounded) + deriving (Arbitrary) via (GenericUniform AccessRoleLegacy) + deriving (ToJSON, FromJSON, S.ToSchema) via Schema AccessRoleLegacy + +fromAccessRoleLegacy :: AccessRoleLegacy -> Set AccessRoleV2 +fromAccessRoleLegacy = \case + PrivateAccessRole -> privateAccessRole + TeamAccessRole -> teamAccessRole + ActivatedAccessRole -> activatedAccessRole + NonActivatedAccessRole -> nonActivatedAccessRole + +privateAccessRole :: Set AccessRoleV2 +privateAccessRole = Set.fromList [] + +teamAccessRole :: Set AccessRoleV2 +teamAccessRole = Set.fromList [TeamMemberAccessRole] + +activatedAccessRole :: Set AccessRoleV2 +activatedAccessRole = Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, ServiceAccessRole] + +nonActivatedAccessRole :: Set AccessRoleV2 +nonActivatedAccessRole = Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole] + +defRole :: Set AccessRoleV2 +defRole = activatedAccessRole + +maybeRole :: ConvType -> Maybe (Set AccessRoleV2) -> Set AccessRoleV2 +maybeRole SelfConv _ = privateAccessRole +maybeRole ConnectConv _ = privateAccessRole +maybeRole One2OneConv _ = privateAccessRole +maybeRole RegularConv Nothing = defRole +maybeRole RegularConv (Just r) = r + +data AccessRoleV2 + = TeamMemberAccessRole + | NonTeamMemberAccessRole + | GuestAccessRole + | ServiceAccessRole deriving stock (Eq, Ord, Show, Generic) - deriving (Arbitrary) via (GenericUniform AccessRole) - deriving (ToJSON, FromJSON, S.ToSchema) via Schema AccessRole + deriving (Arbitrary) via (GenericUniform AccessRoleV2) + deriving (ToJSON, FromJSON, S.ToSchema) via Schema AccessRoleV2 -instance ToSchema AccessRole where +toAccessRoleLegacy :: Set AccessRoleV2 -> AccessRoleLegacy +toAccessRoleLegacy accessRoles = do + fromMaybe NonActivatedAccessRole $ find (allMember accessRoles . fromAccessRoleLegacy) [minBound ..] + where + allMember :: Ord a => Set a -> Set a -> Bool + allMember rhs lhs = all (`Set.member` lhs) rhs + +instance ToSchema AccessRoleV2 where schema = - (S.schema . description ?~ "Which users can join conversations") $ - enum @Text "AccessRole" $ + (S.schema . description ?~ desc) $ + enum @Text "AccessRoleV2" $ + mconcat + [ element "team_member" TeamMemberAccessRole, + element "non_team_member" NonTeamMemberAccessRole, + element "guest" GuestAccessRole, + element "service" ServiceAccessRole + ] + where + desc = + "Which users/services can join conversations.\ + \This replaces the deprecated field `access_role`\ + \and allows for a more fine grained configuration of access roles\ + \in particular a separation of guest and services access." + +instance ToSchema AccessRoleLegacy where + schema = + (S.schema . description ?~ desc) $ + enum @Text "AccessRoleLegacy" $ mconcat [ element "private" PrivateAccessRole, element "team" TeamAccessRole, element "activated" ActivatedAccessRole, element "non_activated" NonActivatedAccessRole ] + where + desc = + "Which users can join conversations (deprecated, use `access_role_v2` instead).\ + \Maps to `access_role_v2` as follows:\ + \`private` => `[]` - nobody can be invited to this conversation (e.g. it's a 1:1 conversation)\ + \`team` => `[team_member]` - team-only conversation\ + \`activated` => `[team_member, non_team_member, service]` - conversation for users who have activated email, phone or SSO and services\ + \`non_activated` => `[team_member, non_team_member, service, guest]` - all allowed, no checks\ + \\ + \Maps from `access_role_v2` as follows:\ + \`[]` => `private` - nobody can be invited to this conversation (e.g. it's a 1:1 conversation)\ + \`[team_member]` => `team` - team-only conversation\ + \`[team_member, non_team_member, service]` => `activated` - conversation for users who have activated email, phone or SSO and services\ + \`[team_member, non_team_member, service, guest]` => `non_activated` - all allowed, no checks.\ + \All other configurations of `access_role_v2` are mapped to the smallest superset containing all given access roles." data ConvType = RegularConv @@ -586,7 +669,7 @@ data NewConv = NewConv newConvQualifiedUsers :: [Qualified UserId], newConvName :: Maybe Text, newConvAccess :: Set Access, - newConvAccessRole :: Maybe AccessRole, + newConvAccessRoles :: Maybe (Set AccessRoleV2), newConvTeam :: Maybe ConvTeamInfo, newConvMessageTimer :: Maybe Milliseconds, newConvReceiptMode :: Maybe ReceiptMode, @@ -619,7 +702,7 @@ newConvSchema = <*> newConvName .= maybe_ (optField "name" schema) <*> (Set.toList . newConvAccess) .= (fromMaybe mempty <$> optField "access" (Set.fromList <$> array schema)) - <*> newConvAccessRole .= maybe_ (optField "access_role" schema) + <*> newConvAccessRoles .= accessRolesSchemaOpt <*> newConvTeam .= maybe_ ( optFieldWithDocModifier @@ -766,7 +849,7 @@ modelConversationUpdateName = Doc.defineModel "ConversationUpdateName" $ do data ConversationAccessData = ConversationAccessData { cupAccess :: Set Access, - cupAccessRole :: AccessRole + cupAccessRoles :: Set AccessRoleV2 } deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform ConversationAccessData) @@ -777,14 +860,14 @@ instance ToSchema ConversationAccessData where object "ConversationAccessData" $ ConversationAccessData <$> cupAccess .= field "access" (set schema) - <*> cupAccessRole .= field "access_role" schema + <*> cupAccessRoles .= accessRolesSchema modelConversationAccessData :: Doc.Model modelConversationAccessData = Doc.defineModel "ConversationAccessData" $ do Doc.description "Contains conversation properties to update" Doc.property "access" (Doc.unique $ Doc.array typeAccess) $ Doc.description "List of conversation access modes." - Doc.property "access_role" (Doc.bytes') $ + Doc.property "access_role" Doc.bytes' $ Doc.description "Conversation access role: private|team|activated|non_activated" data ConversationReceiptModeUpdate = ConversationReceiptModeUpdate diff --git a/libs/wire-api/src/Wire/API/Conversation/Action.hs b/libs/wire-api/src/Wire/API/Conversation/Action.hs index 9080c867328..cb8b5890cd4 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Action.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Action.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Conversation/Bot.hs b/libs/wire-api/src/Wire/API/Conversation/Bot.hs index 4b66f3157b4..05112e9cd90 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Bot.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Bot.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Conversation/Code.hs b/libs/wire-api/src/Wire/API/Conversation/Code.hs index b30525fd7dc..e953df6d475 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Code.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Code.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Conversation/Member.hs b/libs/wire-api/src/Wire/API/Conversation/Member.hs index e72ae9455d2..b01ac7a559f 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Member.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Member.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -252,13 +252,12 @@ instance Arbitrary MemberUpdate where validateMemberUpdate :: MemberUpdate -> Either String MemberUpdate validateMemberUpdate u = - if ( isJust (mupOtrMuteStatus u) - || isJust (mupOtrMuteRef u) - || isJust (mupOtrArchive u) - || isJust (mupOtrArchiveRef u) - || isJust (mupHidden u) - || isJust (mupHiddenRef u) - ) + if isJust (mupOtrMuteStatus u) + || isJust (mupOtrMuteRef u) + || isJust (mupOtrArchive u) + || isJust (mupOtrArchiveRef u) + || isJust (mupHidden u) + || isJust (mupHiddenRef u) then Right u else Left diff --git a/libs/wire-api/src/Wire/API/Conversation/Role.hs b/libs/wire-api/src/Wire/API/Conversation/Role.hs index 836b2ee8d29..0f6891be84b 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Role.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Role.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -137,7 +137,7 @@ instance FromJSON ConversationRole where parseJSON = A.withObject "conversationRole" $ \o -> do role <- o A..: "conversation_role" actions <- o A..: "actions" - case (toConvRole role (Just $ Actions actions)) of + case toConvRole role (Just $ Actions actions) of Just cr -> return cr Nothing -> fail ("Failed to parse: " ++ show o) diff --git a/libs/wire-api/src/Wire/API/Conversation/Typing.hs b/libs/wire-api/src/Wire/API/Conversation/Typing.hs index c603de7e071..dc1480b6e70 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Typing.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Typing.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Cookie.hs b/libs/wire-api/src/Wire/API/Cookie.hs index e77292ab4f6..d92f65c5f93 100644 --- a/libs/wire-api/src/Wire/API/Cookie.hs +++ b/libs/wire-api/src/Wire/API/Cookie.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/CustomBackend.hs b/libs/wire-api/src/Wire/API/CustomBackend.hs index 1b214b6e4ef..456ed8a32a5 100644 --- a/libs/wire-api/src/Wire/API/CustomBackend.hs +++ b/libs/wire-api/src/Wire/API/CustomBackend.hs @@ -1,9 +1,8 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/ErrorDescription.hs b/libs/wire-api/src/Wire/API/ErrorDescription.hs index f6312d19f98..51825b23589 100644 --- a/libs/wire-api/src/Wire/API/ErrorDescription.hs +++ b/libs/wire-api/src/Wire/API/ErrorDescription.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Wire.API.ErrorDescription where import Control.Lens (at, (%~), (.~), (<>~), (?~)) diff --git a/libs/wire-api/src/Wire/API/Event/Conversation.hs b/libs/wire-api/src/Wire/API/Event/Conversation.hs index de7d732d848..fe6331e58b0 100644 --- a/libs/wire-api/src/Wire/API/Event/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Event/Conversation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Event/FeatureConfig.hs b/libs/wire-api/src/Wire/API/Event/FeatureConfig.hs index c9a87c84362..39c82fe3112 100644 --- a/libs/wire-api/src/Wire/API/Event/FeatureConfig.hs +++ b/libs/wire-api/src/Wire/API/Event/FeatureConfig.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Event/Team.hs b/libs/wire-api/src/Wire/API/Event/Team.hs index 627889fda4b..22b48eef5ca 100644 --- a/libs/wire-api/src/Wire/API/Event/Team.hs +++ b/libs/wire-api/src/Wire/API/Event/Team.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Message.hs b/libs/wire-api/src/Wire/API/Message.hs index e5b1c33cf9b..f734a162de2 100644 --- a/libs/wire-api/src/Wire/API/Message.hs +++ b/libs/wire-api/src/Wire/API/Message.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Message/Proto.hs b/libs/wire-api/src/Wire/API/Message/Proto.hs index e8a05e033e6..7e20a378f28 100644 --- a/libs/wire-api/src/Wire/API/Message/Proto.hs +++ b/libs/wire-api/src/Wire/API/Message/Proto.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Notification.hs b/libs/wire-api/src/Wire/API/Notification.hs index f81a038ee85..eb0a31c6d8d 100644 --- a/libs/wire-api/src/Wire/API/Notification.hs +++ b/libs/wire-api/src/Wire/API/Notification.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Properties.hs b/libs/wire-api/src/Wire/API/Properties.hs index 7c7ae6a3e93..38acd2f5d50 100644 --- a/libs/wire-api/src/Wire/API/Properties.hs +++ b/libs/wire-api/src/Wire/API/Properties.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Provider.hs b/libs/wire-api/src/Wire/API/Provider.hs index 823c7204bb1..f6f0314810f 100644 --- a/libs/wire-api/src/Wire/API/Provider.hs +++ b/libs/wire-api/src/Wire/API/Provider.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Provider/Bot.hs b/libs/wire-api/src/Wire/API/Provider/Bot.hs index b9eafb3ff81..cd51e2c405f 100644 --- a/libs/wire-api/src/Wire/API/Provider/Bot.hs +++ b/libs/wire-api/src/Wire/API/Provider/Bot.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Provider/External.hs b/libs/wire-api/src/Wire/API/Provider/External.hs index b311f99e8f5..8fb9e8f698f 100644 --- a/libs/wire-api/src/Wire/API/Provider/External.hs +++ b/libs/wire-api/src/Wire/API/Provider/External.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Provider/Service.hs b/libs/wire-api/src/Wire/API/Provider/Service.hs index bc3694ab90f..972b6cc7f2d 100644 --- a/libs/wire-api/src/Wire/API/Provider/Service.hs +++ b/libs/wire-api/src/Wire/API/Provider/Service.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Provider/Service/Tag.hs b/libs/wire-api/src/Wire/API/Provider/Service/Tag.hs index 2db80c5af5e..27500628d35 100644 --- a/libs/wire-api/src/Wire/API/Provider/Service/Tag.hs +++ b/libs/wire-api/src/Wire/API/Provider/Service/Tag.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Push/Token.hs b/libs/wire-api/src/Wire/API/Push/Token.hs index 540e4644001..c24613ed026 100644 --- a/libs/wire-api/src/Wire/API/Push/Token.hs +++ b/libs/wire-api/src/Wire/API/Push/Token.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Push/V2/Token.hs b/libs/wire-api/src/Wire/API/Push/V2/Token.hs index 79e757693f6..dd42a3ca891 100644 --- a/libs/wire-api/src/Wire/API/Push/V2/Token.hs +++ b/libs/wire-api/src/Wire/API/Push/V2/Token.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -83,7 +83,7 @@ data PushToken = PushToken deriving (Arbitrary) via (GenericUniform PushToken) pushToken :: Transport -> AppName -> Token -> ClientId -> PushToken -pushToken tp an tk cl = PushToken tp an tk cl +pushToken = PushToken modelPushToken :: Doc.Model modelPushToken = Doc.defineModel "PushToken" $ do diff --git a/libs/wire-api/src/Wire/API/Routes/AssetBody.hs b/libs/wire-api/src/Wire/API/Routes/AssetBody.hs index 5f936ddd279..a4b5df227dc 100644 --- a/libs/wire-api/src/Wire/API/Routes/AssetBody.hs +++ b/libs/wire-api/src/Wire/API/Routes/AssetBody.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs index c00dd867c33..8665d12ca74 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Brig/Connection.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Brig/Connection.hs index cf410a00f8a..559e68a28f2 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Brig/Connection.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Brig/Connection.hs @@ -1,4 +1,21 @@ -{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE DisambiguateRecordFields #-} + +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . module Wire.API.Routes.Internal.Brig.Connection where diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Brig/EJPD.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Brig/EJPD.hs index 0e4c357c448..cfaa67ed9ce 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Brig/EJPD.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Brig/EJPD.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/MultiTablePaging.hs b/libs/wire-api/src/Wire/API/Routes/MultiTablePaging.hs index 0fd21bd3a21..4a8f7379677 100644 --- a/libs/wire-api/src/Wire/API/Routes/MultiTablePaging.hs +++ b/libs/wire-api/src/Wire/API/Routes/MultiTablePaging.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/MultiTablePaging/State.hs b/libs/wire-api/src/Wire/API/Routes/MultiTablePaging/State.hs index 1443d90db25..b81a83c37ed 100644 --- a/libs/wire-api/src/Wire/API/Routes/MultiTablePaging/State.hs +++ b/libs/wire-api/src/Wire/API/Routes/MultiTablePaging/State.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/MultiVerb.hs b/libs/wire-api/src/Wire/API/Routes/MultiVerb.hs index 0ce00f642ec..5f0f7eaa328 100644 --- a/libs/wire-api/src/Wire/API/Routes/MultiVerb.hs +++ b/libs/wire-api/src/Wire/API/Routes/MultiVerb.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -325,7 +325,7 @@ instance type ResponseStatus (WithHeaders hs a r) = ResponseStatus r type ResponseBody (WithHeaders hs a r) = ResponseBody r - responseRender acc x = fmap addHeaders $ responseRender @cs @r acc y + responseRender acc x = addHeaders <$> responseRender @cs @r acc y where (hs, y) = toHeaders @xs x addHeaders r = diff --git a/libs/wire-api/src/Wire/API/Routes/Public.hs b/libs/wire-api/src/Wire/API/Routes/Public.hs index 84787518919..569e3aba901 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs index 67d6a218281..c800e770072 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Cannon.hs b/libs/wire-api/src/Wire/API/Routes/Public/Cannon.hs index 28f90c8f56c..8f9745b5035 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Cannon.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Cannon.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Cargohold.hs b/libs/wire-api/src/Wire/API/Routes/Public/Cargohold.hs index f08fdf1c3c5..37be37c15ed 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Cargohold.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Cargohold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs index 1e08d2099df..ad0e261002e 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs @@ -1,10 +1,9 @@ {-# LANGUAGE DerivingVia #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wno-orphans #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/LegalHold.hs b/libs/wire-api/src/Wire/API/Routes/Public/LegalHold.hs index 6c3db162ae9..a89b2db516b 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/LegalHold.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/LegalHold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs index de7886cbf55..f2a2d5eb4cd 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Util.hs b/libs/wire-api/src/Wire/API/Routes/Public/Util.hs index 3779cdad365..d76a730f73a 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Util.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Util.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/QualifiedCapture.hs b/libs/wire-api/src/Wire/API/Routes/QualifiedCapture.hs index 78febbd5799..6356821b5d3 100644 --- a/libs/wire-api/src/Wire/API/Routes/QualifiedCapture.hs +++ b/libs/wire-api/src/Wire/API/Routes/QualifiedCapture.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Routes/WebSocket.hs b/libs/wire-api/src/Wire/API/Routes/WebSocket.hs index 6a2e5c340ed..756605366ad 100644 --- a/libs/wire-api/src/Wire/API/Routes/WebSocket.hs +++ b/libs/wire-api/src/Wire/API/Routes/WebSocket.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/ServantProto.hs b/libs/wire-api/src/Wire/API/ServantProto.hs index 5733cd7e181..aac4230d70a 100644 --- a/libs/wire-api/src/Wire/API/ServantProto.hs +++ b/libs/wire-api/src/Wire/API/ServantProto.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Wire.API.ServantProto where import Data.List.NonEmpty (NonEmpty (..)) diff --git a/libs/wire-api/src/Wire/API/Swagger.hs b/libs/wire-api/src/Wire/API/Swagger.hs index 68160851619..19cdb227c6a 100644 --- a/libs/wire-api/src/Wire/API/Swagger.hs +++ b/libs/wire-api/src/Wire/API/Swagger.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team.hs b/libs/wire-api/src/Wire/API/Team.hs index fda2311e6e1..0a9b5744f61 100644 --- a/libs/wire-api/src/Wire/API/Team.hs +++ b/libs/wire-api/src/Wire/API/Team.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Conversation.hs b/libs/wire-api/src/Wire/API/Team/Conversation.hs index e3ce32fd936..c3e9c3e49ec 100644 --- a/libs/wire-api/src/Wire/API/Team/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Team/Conversation.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Export.hs b/libs/wire-api/src/Wire/API/Team/Export.hs index c4216926576..b0fee5a4bee 100644 --- a/libs/wire-api/src/Wire/API/Team/Export.hs +++ b/libs/wire-api/src/Wire/API/Team/Export.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 758f29d6b31..fb64150eeec 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Invitation.hs b/libs/wire-api/src/Wire/API/Team/Invitation.hs index 132ff0f0d43..3e68bec925d 100644 --- a/libs/wire-api/src/Wire/API/Team/Invitation.hs +++ b/libs/wire-api/src/Wire/API/Team/Invitation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -74,7 +74,7 @@ modelTeamInvitationRequest = Doc.defineModel "TeamInvitationRequest" $ do instance ToJSON InvitationRequest where toJSON i = - object $ + object [ "locale" .= irLocale i, "role" .= irRole i, "name" .= irInviteeName i, @@ -137,7 +137,7 @@ modelTeamInvitation = Doc.defineModel "TeamInvitation" $ do instance ToJSON Invitation where toJSON i = - object $ + object [ "team" .= inTeam i, "role" .= inRole i, "id" .= inInvitation i, diff --git a/libs/wire-api/src/Wire/API/Team/LegalHold.hs b/libs/wire-api/src/Wire/API/Team/LegalHold.hs index 7dd7fc70999..42afa6c9a3e 100644 --- a/libs/wire-api/src/Wire/API/Team/LegalHold.hs +++ b/libs/wire-api/src/Wire/API/Team/LegalHold.hs @@ -1,9 +1,8 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -198,8 +197,8 @@ instance ToSchema ViewLegalHoldServiceInfo where [ ("team_id", Inline (toSchema (Proxy @UUID))), ("base_url", Inline (toSchema (Proxy @HttpsUrl))), ("fingerprint", Inline (toSchema (Proxy @(Fingerprint Rsa)))), - ("auth_token", Inline (toSchema (Proxy @(ServiceToken)))), - ("public_key", Inline (toSchema (Proxy @(ServiceKeyPEM)))) + ("auth_token", Inline (toSchema (Proxy @ServiceToken))), + ("public_key", Inline (toSchema (Proxy @ServiceKeyPEM))) ] example_ = ViewLegalHoldService diff --git a/libs/wire-api/src/Wire/API/Team/LegalHold/External.hs b/libs/wire-api/src/Wire/API/Team/LegalHold/External.hs index 8ac3d310d49..197f0ac513c 100644 --- a/libs/wire-api/src/Wire/API/Team/LegalHold/External.hs +++ b/libs/wire-api/src/Wire/API/Team/LegalHold/External.hs @@ -1,9 +1,8 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Member.hs b/libs/wire-api/src/Wire/API/Team/Member.hs index 600978c6b12..4208458aed7 100644 --- a/libs/wire-api/src/Wire/API/Team/Member.hs +++ b/libs/wire-api/src/Wire/API/Team/Member.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Permission.hs b/libs/wire-api/src/Wire/API/Team/Permission.hs index 272d7281b26..99a42680ab9 100644 --- a/libs/wire-api/src/Wire/API/Team/Permission.hs +++ b/libs/wire-api/src/Wire/API/Team/Permission.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -198,6 +198,5 @@ instance Cql.Cql Permissions where let f = intToPerms . fromIntegral :: Int64 -> Set.Set Perm s <- Err.note "missing 'self' permissions" ("self" `lookup` p) >>= Cql.fromCql d <- Err.note "missing 'copy' permissions" ("copy" `lookup` p) >>= Cql.fromCql - r <- Err.note "invalid permissions" (newPermissions (f s) (f d)) - pure r + Err.note "invalid permissions" (newPermissions (f s) (f d)) fromCql _ = Left "permissions: udt expected" diff --git a/libs/wire-api/src/Wire/API/Team/Role.hs b/libs/wire-api/src/Wire/API/Team/Role.hs index d9d9d74a216..2d65d13ef25 100644 --- a/libs/wire-api/src/Wire/API/Team/Role.hs +++ b/libs/wire-api/src/Wire/API/Team/Role.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/SearchVisibility.hs b/libs/wire-api/src/Wire/API/Team/SearchVisibility.hs index 534dbc07da1..cb777216d35 100644 --- a/libs/wire-api/src/Wire/API/Team/SearchVisibility.hs +++ b/libs/wire-api/src/Wire/API/Team/SearchVisibility.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Team/Size.hs b/libs/wire-api/src/Wire/API/Team/Size.hs index 229b2c037a7..44cad608baf 100644 --- a/libs/wire-api/src/Wire/API/Team/Size.hs +++ b/libs/wire-api/src/Wire/API/Team/Size.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User.hs b/libs/wire-api/src/Wire/API/User.hs index 40780bd55fe..2ef7f9f7158 100644 --- a/libs/wire-api/src/Wire/API/User.hs +++ b/libs/wire-api/src/Wire/API/User.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Activation.hs b/libs/wire-api/src/Wire/API/User/Activation.hs index c7593b2f40c..cd85f248857 100644 --- a/libs/wire-api/src/Wire/API/User/Activation.hs +++ b/libs/wire-api/src/Wire/API/User/Activation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Auth.hs b/libs/wire-api/src/Wire/API/User/Auth.hs index 42eaf096224..a718f24cb7a 100644 --- a/libs/wire-api/src/Wire/API/User/Auth.hs +++ b/libs/wire-api/src/Wire/API/User/Auth.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Client.hs b/libs/wire-api/src/Wire/API/User/Client.hs index 7437a6e74dd..5c6b54e6e58 100644 --- a/libs/wire-api/src/Wire/API/User/Client.hs +++ b/libs/wire-api/src/Wire/API/User/Client.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -730,11 +730,10 @@ instance ToSchema UpdateClient where UpdateClient <$> updateClientPrekeys .= ( fromMaybe [] - <$> ( optFieldWithDocModifier - "prekeys" - (description ?~ "New prekeys for other clients to establish OTR sessions.") - (array schema) - ) + <$> optFieldWithDocModifier + "prekeys" + (description ?~ "New prekeys for other clients to establish OTR sessions.") + (array schema) ) <*> updateClientLastKey .= maybe_ diff --git a/libs/wire-api/src/Wire/API/User/Client/Prekey.hs b/libs/wire-api/src/Wire/API/User/Client/Prekey.hs index 736808d5191..c94dab86c25 100644 --- a/libs/wire-api/src/Wire/API/User/Client/Prekey.hs +++ b/libs/wire-api/src/Wire/API/User/Client/Prekey.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -75,8 +75,7 @@ instance ToSchema Prekey where <*> prekeyKey .= field "key" schema clientIdFromPrekey :: Prekey -> ClientId -clientIdFromPrekey prekey = - newClientId . fromIntegral . hash . prekeyKey $ prekey +clientIdFromPrekey = newClientId . fromIntegral . hash . prekeyKey -------------------------------------------------------------------------------- -- LastPrekey diff --git a/libs/wire-api/src/Wire/API/User/Handle.hs b/libs/wire-api/src/Wire/API/User/Handle.hs index b9d97b22659..103c4946ccd 100644 --- a/libs/wire-api/src/Wire/API/User/Handle.hs +++ b/libs/wire-api/src/Wire/API/User/Handle.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Identity.hs b/libs/wire-api/src/Wire/API/User/Identity.hs index 55584f1eba1..d9b819d9a38 100644 --- a/libs/wire-api/src/Wire/API/User/Identity.hs +++ b/libs/wire-api/src/Wire/API/User/Identity.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/IdentityProvider.hs b/libs/wire-api/src/Wire/API/User/IdentityProvider.hs index 6cca0754def..44430645530 100644 --- a/libs/wire-api/src/Wire/API/User/IdentityProvider.hs +++ b/libs/wire-api/src/Wire/API/User/IdentityProvider.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Orphans.hs b/libs/wire-api/src/Wire/API/User/Orphans.hs index f8757940fc5..232d4f1f85f 100644 --- a/libs/wire-api/src/Wire/API/User/Orphans.hs +++ b/libs/wire-api/src/Wire/API/User/Orphans.hs @@ -1,10 +1,9 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StrictData #-} {-# OPTIONS_GHC -Wno-orphans #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Password.hs b/libs/wire-api/src/Wire/API/User/Password.hs index 87cbe1e4805..044002f6253 100644 --- a/libs/wire-api/src/Wire/API/User/Password.hs +++ b/libs/wire-api/src/Wire/API/User/Password.hs @@ -1,10 +1,10 @@ +{-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Profile.hs b/libs/wire-api/src/Wire/API/User/Profile.hs index 0c4a7a389cb..bdca14b31e6 100644 --- a/libs/wire-api/src/Wire/API/User/Profile.hs +++ b/libs/wire-api/src/Wire/API/User/Profile.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/RichInfo.hs b/libs/wire-api/src/Wire/API/User/RichInfo.hs index 65ca1e1d0bd..350c878715e 100644 --- a/libs/wire-api/src/Wire/API/User/RichInfo.hs +++ b/libs/wire-api/src/Wire/API/User/RichInfo.hs @@ -1,10 +1,9 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -49,6 +48,7 @@ where import Data.Aeson import qualified Data.Aeson.Types as Aeson +import Data.Bifunctor import Data.CaseInsensitive (CI) import qualified Data.CaseInsensitive as CI import qualified Data.HashMap.Strict as HM @@ -130,7 +130,7 @@ toRichInfoAssocList (RichInfoMapAndList mp al) = go rfs (key, val) = case break (\(RichField rfKey _) -> rfKey == key) rfs of (xs, []) -> xs <> [RichField key val] - (xs, (_ : ys)) -> xs <> [RichField key val] <> ys + (xs, _ : ys) -> xs <> [RichField key val] <> ys -- | This is called by spar to recover the more type that also contains a map. Since we don't -- know where the data came from when it was posted or where the SCIM peer expects the data to @@ -168,7 +168,7 @@ instance ToJSON RichInfoMapAndList where "version" .= (0 :: Int) ] ], - richInfoMapURN .= (Map.mapKeys CI.original $ richInfoMap u) + richInfoMapURN .= Map.mapKeys CI.original (richInfoMap u) ] instance FromJSON RichInfoMapAndList where @@ -197,14 +197,13 @@ instance FromJSON RichInfoMapAndList where richInfo <- lookupOrFail "richinfo" $ hmMapKeys CI.mk innerObj case richInfo of Object richinfoObj -> do - fields <- richInfoAssocListFromObject richinfoObj - pure fields + richInfoAssocListFromObject richinfoObj Array fields -> parseJSON (Array fields) v -> Aeson.typeMismatch "Object or Array" v Just v -> Aeson.typeMismatch "Object" v hmMapKeys :: (Eq k2, Hashable k2) => (k1 -> k2) -> HashMap k1 v -> HashMap k2 v - hmMapKeys f = HashMap.fromList . (map (\(k, v) -> (f k, v))) . HashMap.toList + hmMapKeys f = HashMap.fromList . map (Data.Bifunctor.first f) . HashMap.toList lookupOrFail :: (MonadFail m, Show k, Eq k, Hashable k) => k -> HashMap k v -> m v lookupOrFail key theMap = case HM.lookup key theMap of diff --git a/libs/wire-api/src/Wire/API/User/Saml.hs b/libs/wire-api/src/Wire/API/User/Saml.hs index 7c7c99fed5a..10c28e4324a 100644 --- a/libs/wire-api/src/Wire/API/User/Saml.hs +++ b/libs/wire-api/src/Wire/API/User/Saml.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -123,7 +123,7 @@ newtype TTL (tablename :: Symbol) = TTL {fromTTL :: Int32} deriving (Eq, Ord, Show, Num) showTTL :: KnownSymbol a => TTL a -> String -showTTL (TTL i :: TTL a) = "TTL:" <> (symbolVal (Proxy @a)) <> ":" <> show i +showTTL (TTL i :: TTL a) = "TTL:" <> symbolVal (Proxy @a) <> ":" <> show i instance FromJSON (TTL a) where parseJSON = withScientific "TTL value (seconds)" (pure . TTL . round) diff --git a/libs/wire-api/src/Wire/API/User/Scim.hs b/libs/wire-api/src/Wire/API/User/Scim.hs index 8146ad0b0a1..e1255157aa9 100644 --- a/libs/wire-api/src/Wire/API/User/Scim.hs +++ b/libs/wire-api/src/Wire/API/User/Scim.hs @@ -20,7 +20,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/User/Search.hs b/libs/wire-api/src/Wire/API/User/Search.hs index 4d27badd6ca..152500a8e3a 100644 --- a/libs/wire-api/src/Wire/API/User/Search.hs +++ b/libs/wire-api/src/Wire/API/User/Search.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/UserMap.hs b/libs/wire-api/src/Wire/API/UserMap.hs index 8226fc5ab7a..7bab42b61e2 100644 --- a/libs/wire-api/src/Wire/API/UserMap.hs +++ b/libs/wire-api/src/Wire/API/UserMap.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Util/Aeson.hs b/libs/wire-api/src/Wire/API/Util/Aeson.hs index 794c83d6585..4b0f3ad2d7a 100644 --- a/libs/wire-api/src/Wire/API/Util/Aeson.hs +++ b/libs/wire-api/src/Wire/API/Util/Aeson.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/src/Wire/API/Wrapped.hs b/libs/wire-api/src/Wire/API/Wrapped.hs index 85b0366b436..4c8b59b71ce 100644 --- a/libs/wire-api/src/Wire/API/Wrapped.hs +++ b/libs/wire-api/src/Wire/API/Wrapped.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Main.hs b/libs/wire-api/test/golden/Main.hs index fc3112b0939..7ad5b57d554 100644 --- a/libs/wire-api/test/golden/Main.hs +++ b/libs/wire-api/test/golden/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/FromJSON.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/FromJSON.hs index 5c0485a2799..f30027e4044 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/FromJSON.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/FromJSON.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs index cefc6936c64..2b0f1dc2e8b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -19,7 +19,7 @@ module Test.Wire.API.Golden.Generated where import Imports import Test.Tasty -import qualified Test.Wire.API.Golden.Generated.AccessRole_user +import qualified Test.Wire.API.Golden.Generated.AccessRoleLegacy_user import qualified Test.Wire.API.Golden.Generated.AccessToken_user import qualified Test.Wire.API.Golden.Generated.Access_user import qualified Test.Wire.API.Golden.Generated.Action_user @@ -423,12 +423,12 @@ tests = (Test.Wire.API.Golden.Generated.Access_user.testObject_Access_user_3, "testObject_Access_user_3.json"), (Test.Wire.API.Golden.Generated.Access_user.testObject_Access_user_4, "testObject_Access_user_4.json") ], - testGroup "Golden: AccessRole_user" $ + testGroup "Golden: AccessRoleLegacy_user" $ testObjects - [ (Test.Wire.API.Golden.Generated.AccessRole_user.testObject_AccessRole_user_1, "testObject_AccessRole_user_1.json"), - (Test.Wire.API.Golden.Generated.AccessRole_user.testObject_AccessRole_user_2, "testObject_AccessRole_user_2.json"), - (Test.Wire.API.Golden.Generated.AccessRole_user.testObject_AccessRole_user_3, "testObject_AccessRole_user_3.json"), - (Test.Wire.API.Golden.Generated.AccessRole_user.testObject_AccessRole_user_4, "testObject_AccessRole_user_4.json") + [ (Test.Wire.API.Golden.Generated.AccessRoleLegacy_user.testObject_AccessRoleLegacy_user_1, "testObject_AccessRoleLegacy_user_1.json"), + (Test.Wire.API.Golden.Generated.AccessRoleLegacy_user.testObject_AccessRoleLegacy_user_2, "testObject_AccessRoleLegacy_user_2.json"), + (Test.Wire.API.Golden.Generated.AccessRoleLegacy_user.testObject_AccessRoleLegacy_user_3, "testObject_AccessRoleLegacy_user_3.json"), + (Test.Wire.API.Golden.Generated.AccessRoleLegacy_user.testObject_AccessRoleLegacy_user_4, "testObject_AccessRoleLegacy_user_4.json") ], testGroup "Golden: ConvType_user" $ testObjects diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs new file mode 100644 index 00000000000..ad1587d065a --- /dev/null +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs @@ -0,0 +1,31 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . +module Test.Wire.API.Golden.Generated.AccessRoleLegacy_user where + +import Wire.API.Conversation (AccessRoleLegacy (..)) + +testObject_AccessRoleLegacy_user_1 :: AccessRoleLegacy +testObject_AccessRoleLegacy_user_1 = PrivateAccessRole + +testObject_AccessRoleLegacy_user_2 :: AccessRoleLegacy +testObject_AccessRoleLegacy_user_2 = NonActivatedAccessRole + +testObject_AccessRoleLegacy_user_3 :: AccessRoleLegacy +testObject_AccessRoleLegacy_user_3 = ActivatedAccessRole + +testObject_AccessRoleLegacy_user_4 :: AccessRoleLegacy +testObject_AccessRoleLegacy_user_4 = TeamAccessRole diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessToken_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessToken_user.hs index 07d447cec88..ceee11b3000 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessToken_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessToken_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AccessToken_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Access_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Access_user.hs index a83850f1e73..224a0d51938 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Access_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Access_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Access_user where import Wire.API.Conversation (Access (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Action_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Action_user.hs index 32ba59d1f34..840884b3947 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Action_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Action_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Action_user where import Wire.API.Conversation.Role (Action (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Activate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Activate_user.hs index 7c97b129b59..65de6c90cca 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Activate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Activate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Activate_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationCode_user.hs index 263af2ce730..1fa5f2afab2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ActivationCode_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationKey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationKey_user.hs index 222c607be3b..4bbb5b0bb19 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationKey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationKey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ActivationKey_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationResponse_user.hs index 0b0cdf459e6..4925ed4d787 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ActivationResponse_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ActivationResponse_user where import Imports (Bool (False, True), Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs index ba92bf01810..380efedc0b5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AddBotResponse_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBot_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBot_user.hs index 8cf34d7a49a..8b90e0b64c9 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBot_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBot_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AddBot_user where import Data.ISO3166_CountryCodes (CountryCode (GR)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AppName_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AppName_user.hs index deebb3d8e91..0be098c1593 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AppName_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AppName_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AppName_user where import Wire.API.Push.Token (AppName (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ApproveLegalHoldForUserRequest_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ApproveLegalHoldForUserRequest_team.hs index 1f543dd109c..24ef1ad9958 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ApproveLegalHoldForUserRequest_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ApproveLegalHoldForUserRequest_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ApproveLegalHoldForUserRequest_team where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetKey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetKey_user.hs index 1838bd39b36..8e35defa16d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetKey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetKey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AssetKey_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetRetention_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetRetention_user.hs index d903bdba6d0..131d8681a20 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetRetention_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetRetention_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AssetRetention_user where import Wire.API.Asset (AssetRetention (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSettings_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSettings_user.hs index aac0733ba54..d80e2f12f63 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSettings_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSettings_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AssetSettings_user where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSize_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSize_user.hs index 260f31c5b1d..620ee1b2341 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSize_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetSize_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AssetSize_user where import Wire.API.User (AssetSize (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetToken_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetToken_user.hs index 6854768adb0..a4c4e08d7c4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetToken_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetToken_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AssetToken_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Asset_asset.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Asset_asset.hs index 98da5bf2c18..8abb106dbd7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Asset_asset.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Asset_asset.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Asset_asset where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs index a0f5251163c..1eb13e0c5ca 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.BindingNewTeamUser_user where import Data.Currency (Alpha (XUA)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs index da298e1615b..95ec210ac87 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.BindingNewTeam_team where import Data.Range (unsafeRange) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotConvView_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotConvView_provider.hs index 5748380c748..71d7b077579 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotConvView_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotConvView_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.BotConvView_provider where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotUserView_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotUserView_provider.hs index 767aed2c5a3..8a0e03e58bc 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotUserView_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotUserView_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.BotUserView_provider where import Data.Handle (Handle (Handle, fromHandle)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CheckHandles_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CheckHandles_user.hs index c753e5e3ca8..25dd6cc0bdf 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CheckHandles_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CheckHandles_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CheckHandles_user where import Data.Range (unsafeRange) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientClass_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientClass_user.hs index 6c4536b6d95..d7e1ee34f0d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientClass_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientClass_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ClientClass_user where import Wire.API.User.Client (ClientClass (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientMismatch_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientMismatch_user.hs index 2371f701f21..5b347337a21 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientMismatch_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientMismatch_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ClientMismatch_user where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientPrekey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientPrekey_user.hs index 64b22205f98..49e0ee53d0b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientPrekey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientPrekey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ClientPrekey_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientType_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientType_user.hs index 3fcca222d13..61bdfca0021 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientType_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ClientType_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ClientType_user where import Wire.API.User.Client (ClientType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Client_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Client_user.hs index 0b28dbb04c1..dbf2c6a1ee8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Client_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Client_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Client_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ColourId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ColourId_user.hs index 0715756d920..b4cfa8fb5c1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ColourId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ColourId_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ColourId_user where import Wire.API.User (ColourId (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_provider.hs index e7d1dbbb8ce..f92fababec3 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CompletePasswordReset_provider where import Data.Code (Key (Key, asciiKey), Value (Value, asciiValue)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_user.hs index 59c5f529345..7b816b9cbaa 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CompletePasswordReset_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CompletePasswordReset_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Connect_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Connect_user.hs index 2e402120580..3b234babf96 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Connect_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Connect_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Connect_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionRequest_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionRequest_user.hs index c5545cce923..bf3db2f6282 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionRequest_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionRequest_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConnectionRequest_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionUpdate_user.hs index 6eb9a79a59a..781de93baaa 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConnectionUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConnectionUpdate_user where import Wire.API.Connection (ConnectionUpdate (..), Relation (Cancelled)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Contact_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Contact_user.hs index afc1918ded5..e0706923a17 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Contact_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Contact_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Contact_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvMembers_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvMembers_user.hs index 2666cd20610..3a782820a73 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvMembers_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvMembers_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConvMembers_user where import Data.Domain (Domain (Domain)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvTeamInfo_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvTeamInfo_user.hs index 8e1ec683b10..a73ec7f8435 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvTeamInfo_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvTeamInfo_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConvTeamInfo_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvType_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvType_user.hs index 9a8d52c255f..6792c3034be 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvType_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConvType_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConvType_user where import Wire.API.Conversation (ConvType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationAccessData_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationAccessData_user.hs index 679ff788fcf..3180a34d81e 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationAccessData_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationAccessData_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,18 +16,20 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationAccessData_user where +import qualified Data.Set as Set (fromList) import Wire.API.Conversation ( Access (InviteAccess), - AccessRole (ActivatedAccessRole, NonActivatedAccessRole), + AccessRoleV2 (..), ConversationAccessData (..), ) testObject_ConversationAccessData_user_1 :: ConversationAccessData testObject_ConversationAccessData_user_1 = - ConversationAccessData {cupAccess = [], cupAccessRole = NonActivatedAccessRole} + ConversationAccessData {cupAccess = [], cupAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]} testObject_ConversationAccessData_user_2 :: ConversationAccessData testObject_ConversationAccessData_user_2 = - ConversationAccessData {cupAccess = [InviteAccess], cupAccessRole = ActivatedAccessRole} + ConversationAccessData {cupAccess = [InviteAccess], cupAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole]} diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationCode_user.hs index d90f012f48c..27c4ed16765 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationCode_user where import Data.Code (Key (Key, asciiKey), Value (Value, asciiValue)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20Conversation_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20Conversation_user.hs index e51e664e48b..f26461b6760 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20Conversation_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20Conversation_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,12 +16,14 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationList_20Conversation_user where import Data.Domain (Domain (..)) import Data.Id (Id (Id)) import Data.Misc (Milliseconds (Ms, ms)) import Data.Qualified (Qualified (..)) +import qualified Data.Set as Set import qualified Data.UUID as UUID (fromString) import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust) import Wire.API.Conversation @@ -41,7 +43,7 @@ testObject_ConversationList_20Conversation_user_1 = { cnvmType = RegularConv, cnvmCreator = Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000001")), cnvmAccess = [], - cnvmAccessRole = PrivateAccessRole, + cnvmAccessRoles = Set.empty, cnvmName = Just "", cnvmTeam = Just (Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001"))), cnvmMessageTimer = Just (Ms {ms = 4760386328981119}), diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20_28Id_20_2a_20C_29_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20_28Id_20_2a_20C_29_user.hs index 48e077f1d2f..9bf51ace5a7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20_28Id_20_2a_20C_29_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20_28Id_20_2a_20C_29_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationList_20_28Id_20_2a_20C_29_user where import Data.Id (ConvId, Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationMessageTimerUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationMessageTimerUpdate_user.hs index 0af33e520e3..928a7798489 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationMessageTimerUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationMessageTimerUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationMessageTimerUpdate_user where import Data.Misc (Milliseconds (Ms, ms)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationReceiptModeUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationReceiptModeUpdate_user.hs index 8e368268f03..aa442a21397 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationReceiptModeUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationReceiptModeUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationReceiptModeUpdate_user where import Wire.API.Conversation (ConversationReceiptModeUpdate (..), ReceiptMode (ReceiptMode, unReceiptMode)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRename_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRename_user.hs index 66ef9fe176a..66666d13f68 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRename_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRename_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationRename_user where import Wire.API.Conversation (ConversationRename (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRole_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRole_user.hs index c7a78852875..00664cbeeb2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRole_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRole_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationRole_user where import qualified Data.Set as Set (fromList) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRolesList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRolesList_user.hs index f19c8017fd4..017e918cce6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRolesList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationRolesList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ConversationRolesList_user where import qualified Data.Set as Set (fromList) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Conversation_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Conversation_user.hs index 688f856d43f..a22ed63d9a4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Conversation_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Conversation_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,12 +16,14 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Conversation_user where import Data.Domain import Data.Id (Id (Id)) import Data.Misc (Milliseconds (Ms, ms)) import Data.Qualified +import qualified Data.Set as Set import qualified Data.UUID as UUID (fromString) import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust) import Wire.API.Conversation @@ -40,7 +42,7 @@ testObject_Conversation_user_1 = { cnvmType = One2OneConv, cnvmCreator = Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000001")), cnvmAccess = [], - cnvmAccessRole = PrivateAccessRole, + cnvmAccessRoles = Set.empty, cnvmName = Just " 0", cnvmTeam = Just (Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000002"))), cnvmMessageTimer = Nothing, @@ -86,7 +88,7 @@ testObject_Conversation_user_2 = PrivateAccess, InviteAccess ], - cnvmAccessRole = NonActivatedAccessRole, + cnvmAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole, ServiceAccessRole], cnvmName = Just "", cnvmTeam = Nothing, cnvmMessageTimer = Just (Ms {ms = 1319272593797015}), diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieId_user.hs index a3a1d2e996b..b661050f5c0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieId_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CookieId_user where import Wire.API.User.Auth (CookieId (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieLabel_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieLabel_user.hs index 7848cd8d20f..8279005b205 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieLabel_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieLabel_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CookieLabel_user where import Wire.API.User.Auth (CookieLabel (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieList_user.hs index 3c6af0fe9c0..d0d6548e2bc 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CookieList_user where import Imports (Maybe (Just, Nothing), read) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieType_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieType_user.hs index f42b62aa4ad..8ae0097d949 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieType_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CookieType_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CookieType_user where import Wire.API.User.Auth (CookieType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Cookie_20_28_29_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Cookie_20_28_29_user.hs index 1eb12c382b8..489404c003d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Cookie_20_28_29_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Cookie_20_28_29_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Cookie_20_28_29_user where import Imports (Maybe (Just, Nothing), read) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CustomBackend_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CustomBackend_user.hs index e30663bd5f3..1292c22b83b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CustomBackend_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/CustomBackend_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.CustomBackend_user where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteProvider_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteProvider_provider.hs index 4b5fce83ed9..21a41f39dbe 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteProvider_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteProvider_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.DeleteProvider_provider where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteService_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteService_provider.hs index fa3d1e6f474..76debdc1a94 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteService_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteService_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.DeleteService_provider where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteUser_user.hs index 28bf4705481..b5194f8f9d2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeleteUser_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.DeleteUser_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeletionCodeTimeout_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeletionCodeTimeout_user.hs index 61970b7d0c4..0e2deedbddc 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeletionCodeTimeout_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DeletionCodeTimeout_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.DeletionCodeTimeout_user where import Data.Code (Timeout (Timeout)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DisableLegalHoldForUserRequest_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DisableLegalHoldForUserRequest_team.hs index 027baae6017..d16f4396ba0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DisableLegalHoldForUserRequest_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/DisableLegalHoldForUserRequest_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.DisableLegalHoldForUserRequest_team where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_provider.hs index ec068db9c25..f9fa7e94679 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.EmailUpdate_provider where import Wire.API.Provider (EmailUpdate (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_user.hs index bb62ba80707..02d7ef5ab27 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EmailUpdate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.EmailUpdate_user where import Wire.API.User (Email (Email, emailDomain, emailLocal), EmailUpdate (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Email_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Email_user.hs index e64d8e51f83..413c9f2ceaa 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Email_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Email_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Email_user where import Wire.API.User (Email (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_team.hs index 49821b7bb84..2aa6f06df6d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.EventType_team where import Wire.API.Event.Team (EventType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_user.hs index b04b9d2b6b2..5405c85c4c1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/EventType_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.EventType_user where import Wire.API.Event.Conversation diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs index 486e01bf694..74a885e4d00 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Event_team where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_user.hs index 93e7d7dbfe6..2922d39d961 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Event_user where import Data.Domain @@ -24,6 +25,7 @@ import Data.Id (ClientId (ClientId, client), Id (Id)) import Data.Misc (Milliseconds (Ms, ms)) import Data.Qualified import Data.Range (unsafeRange) +import qualified Data.Set as Set import Data.Text.Ascii (validate) import qualified Data.UUID as UUID (fromString) import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust, read, undefined) @@ -56,7 +58,7 @@ testObject_Event_user_2 = ( EdConvAccessUpdate ( ConversationAccessData { cupAccess = [InviteAccess, LinkAccess, PrivateAccess, InviteAccess, InviteAccess], - cupAccessRole = ActivatedAccessRole + cupAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole] } ) ) @@ -149,7 +151,7 @@ testObject_Event_user_8 = cnvmCreator = Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000200000001")), cnvmAccess = [InviteAccess, PrivateAccess, LinkAccess, InviteAccess, InviteAccess, InviteAccess, LinkAccess], - cnvmAccessRole = NonActivatedAccessRole, + cnvmAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole, ServiceAccessRole], cnvmName = Just "\a\SO\r", cnvmTeam = Just (Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000100000001"))), cnvmMessageTimer = Just (Ms {ms = 283898987885780}), diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/HandleUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/HandleUpdate_user.hs index 0378bc09657..2bd23eff1bd 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/HandleUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/HandleUpdate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.HandleUpdate_user where import Wire.API.User (HandleUpdate (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationCode_user.hs index 4729210634c..fe77dbcd0f6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationCode_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.InvitationCode_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationList_team.hs index 716426df267..5a3d0eee55d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationList_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.InvitationList_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationRequest_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationRequest_team.hs index 8d922fe0688..65ad681829c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationRequest_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/InvitationRequest_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.InvitationRequest_team where import Data.ISO3166_CountryCodes (CountryCode (BJ, FJ, GH, LB, ME, NL, OM, PA, TC, TZ)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invitation_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invitation_team.hs index 62d36ce21ea..189efd4cff8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invitation_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invitation_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Invitation_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invite_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invite_user.hs index 16c2a2ccfde..2eaf28fe46c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invite_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Invite_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Invite_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LastPrekey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LastPrekey_user.hs index f267a7e1331..4f670acefa1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LastPrekey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LastPrekey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LastPrekey_user where import Wire.API.User.Client.Prekey (LastPrekey, lastPrekey) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceConfirm_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceConfirm_team.hs index 15352272239..d3ba6863d69 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceConfirm_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceConfirm_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LegalHoldServiceConfirm_team where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceRemove_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceRemove_team.hs index ab23d3e1f14..ab0b1ea66d1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceRemove_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LegalHoldServiceRemove_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LegalHoldServiceRemove_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LimitedQualifiedUserIdList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LimitedQualifiedUserIdList_user.hs index eeec037c54a..99ddddd2b1c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LimitedQualifiedUserIdList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LimitedQualifiedUserIdList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LimitedQualifiedUserIdList_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ListType_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ListType_team.hs index 432524ff61e..50e52c4fb91 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ListType_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ListType_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ListType_team where import Wire.API.Team.Member (ListType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LocaleUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LocaleUpdate_user.hs index 1df7d28bb00..26cc050f380 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LocaleUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LocaleUpdate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LocaleUpdate_user where import Data.ISO3166_CountryCodes diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Locale_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Locale_user.hs index 903d08a67bc..0f6d645ef91 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Locale_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Locale_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Locale_user where import Data.ISO3166_CountryCodes (CountryCode (CR, DO, EG, HT, IN, LK, LS, MA, PS, TL, VI)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCodeTimeout_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCodeTimeout_user.hs index 44c1de104b2..3a16b9155c8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCodeTimeout_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCodeTimeout_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LoginCodeTimeout_user where import Data.Code (Timeout (Timeout)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCode_user.hs index 9b31b4bd02b..dea724a9818 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LoginCode_user where import Wire.API.User.Auth (LoginCode (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginId_user.hs index 8a9ff20d81f..a10c3f8916a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginId_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.LoginId_user where import Data.Handle (Handle (Handle, fromHandle)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Login_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Login_user.hs index 9883ed5b66a..7e35d440095 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Login_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Login_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Login_user where import Data.Handle (Handle (Handle, fromHandle)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ManagedBy_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ManagedBy_user.hs index 54718ecabf3..3fe37649bef 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ManagedBy_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ManagedBy_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ManagedBy_user where import Wire.API.User (ManagedBy (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdateData_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdateData_user.hs index 3d7d8181b99..3451bfd32d5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdateData_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdateData_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.MemberUpdateData_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdate_user.hs index 36fccb34a21..f5b7d6983db 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MemberUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.MemberUpdate_user where import Imports (Bool (False, True), Maybe (Just, Nothing), ($), (.)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Member_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Member_user.hs index bbac8ae66a6..2afb28221c8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Member_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Member_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Member_user where import Data.Domain (Domain (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MutedStatus_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MutedStatus_user.hs index 3b76a797da0..f7c8717c6cd 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MutedStatus_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/MutedStatus_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.MutedStatus_user where import Wire.API.Conversation (MutedStatus (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NameUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NameUpdate_user.hs index 284742e406e..df7a72efc9e 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NameUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NameUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NameUpdate_user where import Wire.API.User (NameUpdate (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Name_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Name_user.hs index 40e53762e4d..9d7c8b290e2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Name_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Name_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Name_user where import Wire.API.User (Name (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewAssetToken_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewAssetToken_user.hs index 663b080c890..fa3e41bc308 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewAssetToken_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewAssetToken_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewAssetToken_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotRequest_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotRequest_provider.hs index 9eb10e5c130..a8c817ec707 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotRequest_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotRequest_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewBotRequest_provider where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotResponse_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotResponse_provider.hs index cdefa06300d..5fb8047bd82 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotResponse_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewBotResponse_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewBotResponse_provider where import Imports (Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewClient_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewClient_user.hs index 8b59044e0f7..84219041567 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewClient_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewClient_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewClient_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvManaged_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvManaged_user.hs index b13be02b2b7..2d760ecb05c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvManaged_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvManaged_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewConvManaged_user where import Data.Domain @@ -25,12 +26,12 @@ import qualified Data.Set as Set (fromList) import qualified Data.UUID as UUID (fromString) import Imports (Bool (True), Maybe (Just, Nothing), fromJust) import Wire.API.Conversation - ( AccessRole (ActivatedAccessRole), + ( AccessRoleV2 (..), ConvTeamInfo (ConvTeamInfo, cnvManaged, cnvTeamId), NewConv ( NewConv, newConvAccess, - newConvAccessRole, + newConvAccessRoles, newConvMessageTimer, newConvName, newConvQualifiedUsers, @@ -55,7 +56,7 @@ testObject_NewConvManaged_user_1 = newConvQualifiedUsers = [], newConvName = Nothing, newConvAccess = Set.fromList [], - newConvAccessRole = Just ActivatedAccessRole, + newConvAccessRoles = Just (Set.fromList [TeamMemberAccessRole, GuestAccessRole]), newConvTeam = Just ( ConvTeamInfo diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvUnmanaged_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvUnmanaged_user.hs index 354b46f65f6..69046ee0d45 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvUnmanaged_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewConvUnmanaged_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewConvUnmanaged_user where import Data.Domain (Domain (Domain)) @@ -24,17 +25,15 @@ import Data.Misc (Milliseconds (Ms, ms)) import Data.Qualified (Qualified (Qualified)) import qualified Data.Set as Set (fromList) import qualified Data.UUID as UUID (fromString) -import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust) +import Imports import Wire.API.Conversation ( Access (CodeAccess, InviteAccess, LinkAccess, PrivateAccess), - AccessRole - ( ActivatedAccessRole - ), + AccessRoleV2 (..), ConvTeamInfo (ConvTeamInfo, cnvManaged, cnvTeamId), NewConv ( NewConv, newConvAccess, - newConvAccessRole, + newConvAccessRoles, newConvMessageTimer, newConvName, newConvQualifiedUsers, @@ -62,7 +61,7 @@ testObject_NewConvUnmanaged_user_1 = newConvQualifiedUsers = [], newConvName = Nothing, newConvAccess = Set.fromList [PrivateAccess, InviteAccess], - newConvAccessRole = Just ActivatedAccessRole, + newConvAccessRoles = Just $ Set.fromList [TeamMemberAccessRole, GuestAccessRole], newConvTeam = Just ( ConvTeamInfo @@ -84,7 +83,7 @@ testObject_NewConvUnmanaged_user_2 = newConvQualifiedUsers = [Qualified (Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001"))) testDomain], newConvName = Just "\128527\1061495", newConvAccess = Set.fromList [], - newConvAccessRole = Nothing, + newConvAccessRoles = Nothing, newConvTeam = Just ( ConvTeamInfo @@ -110,7 +109,7 @@ testObject_NewConvUnmanaged_user_3 = newConvQualifiedUsers = [], newConvName = Nothing, newConvAccess = Set.fromList [InviteAccess, LinkAccess, CodeAccess], - newConvAccessRole = Just ActivatedAccessRole, + newConvAccessRoles = Just (Set.fromList [TeamMemberAccessRole, GuestAccessRole]), newConvTeam = Nothing, newConvMessageTimer = Nothing, newConvReceiptMode = Nothing, diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldClient_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldClient_team.hs index a0ae49570b7..9ab9f0680eb 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldClient_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldClient_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewLegalHoldClient_team where import Wire.API.Team.LegalHold.External (NewLegalHoldClient (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldService_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldService_team.hs index 1529d51df9c..38d02e2ca23 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldService_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewLegalHoldService_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewLegalHoldService_team where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewOtrMessage_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewOtrMessage_user.hs index 797b95adf56..3835b5648f8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewOtrMessage_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewOtrMessage_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewOtrMessage_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewPasswordReset_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewPasswordReset_user.hs index 3fe2533b9be..7dba95b1092 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewPasswordReset_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewPasswordReset_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewPasswordReset_user where import Imports (Either (Left, Right)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProviderResponse_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProviderResponse_provider.hs index f59eb1fb24c..d0f0da6b345 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProviderResponse_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProviderResponse_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewProviderResponse_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProvider_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProvider_provider.hs index 6a790aca166..ea43a9d5bfd 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProvider_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewProvider_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewProvider_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewServiceResponse_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewServiceResponse_provider.hs index 13b16c9ad78..eb8ad976c1a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewServiceResponse_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewServiceResponse_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewServiceResponse_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewService_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewService_provider.hs index bda95ebe232..6185daea471 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewService_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewService_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewService_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewTeamMember_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewTeamMember_team.hs index 4092949a185..0f7bf7960a9 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewTeamMember_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewTeamMember_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewTeamMember_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUserPublic_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUserPublic_user.hs index 3bbb4b9effe..8f07d130f02 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUserPublic_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUserPublic_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewUserPublic_user where import qualified Data.LanguageCodes (ISO639_1 (SO)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs index 68039b8ac3e..2b55d8861f7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.NewUser_user where import Data.Currency (Alpha (XUA)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMemberUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMemberUpdate_user.hs index 0b6df26ed69..c39e42f3980 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMemberUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMemberUpdate_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.OtherMemberUpdate_user where import Imports (Maybe (Just), fromJust) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMember_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMember_user.hs index d81e884f552..92ab9e2227a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMember_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtherMember_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.OtherMember_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrMessage_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrMessage_user.hs index b2df2431457..5f2e76d68ed 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrMessage_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrMessage_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.OtrMessage_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrRecipients_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrRecipients_user.hs index 529afdfc286..93436c82417 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrRecipients_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/OtrRecipients_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.OtrRecipients_user where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_provider.hs index f5f582f1480..5449a899f0f 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PasswordChange_provider where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_user.hs index 5abb7ec19c4..330d474f21a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordChange_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PasswordChange_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetCode_user.hs index 9043f3ac57a..ce86b45ad04 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PasswordResetCode_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetKey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetKey_user.hs index 603115aebb2..bfd80ad2ce5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetKey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordResetKey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PasswordResetKey_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordReset_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordReset_provider.hs index db5babfde20..41a1f2a1333 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordReset_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PasswordReset_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PasswordReset_provider where import Wire.API.Provider (PasswordReset (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PendingLoginCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PendingLoginCode_user.hs index f5c04abee97..63dc3c5d1ed 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PendingLoginCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PendingLoginCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PendingLoginCode_user where import Data.Code (Timeout (Timeout)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Permissions_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Permissions_team.hs index 8056d6de1a2..1d6e451f5a5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Permissions_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Permissions_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Permissions_team where import GHC.Exts (IsList (fromList)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PhoneUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PhoneUpdate_user.hs index a6db7084512..d3a50413905 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PhoneUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PhoneUpdate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PhoneUpdate_user where import Wire.API.User (Phone (Phone, fromPhone), PhoneUpdate (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Phone_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Phone_user.hs index d5ec4012a09..fd078b9198d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Phone_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Phone_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Phone_user where import Wire.API.User (Phone (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Pict_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Pict_user.hs index cabef1558d2..f20c0fca1e6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Pict_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Pict_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Pict_user where import Wire.API.User (Pict (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyBundle_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyBundle_user.hs index 01074fa229c..4a96b54647a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyBundle_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyBundle_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PrekeyBundle_user where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyId_user.hs index 49bb376bb70..e305658d406 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PrekeyId_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PrekeyId_user where import Wire.API.User.Client.Prekey (PrekeyId (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Prekey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Prekey_user.hs index 1fd28150066..d6c756c208d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Prekey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Prekey_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Prekey_user where import Wire.API.User.Client.Prekey (Prekey (..), PrekeyId (PrekeyId, keyId)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Priority_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Priority_user.hs index b00f9d56e4a..3e36e3ac5e6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Priority_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Priority_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Priority_user where import Wire.API.Message (Priority (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyKey_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyKey_user.hs index 4f9177a2ce8..5a0785832d3 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyKey_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyKey_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PropertyKey_user where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyValue_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyValue_user.hs index f1507980566..5f391eeffb6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyValue_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PropertyValue_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PropertyValue_user where import Data.Aeson (Value (Number)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderActivationResponse_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderActivationResponse_provider.hs index 5362288c3f2..9b9df0aba3b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderActivationResponse_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderActivationResponse_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ProviderActivationResponse_provider where import Wire.API.Provider (ProviderActivationResponse (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderLogin_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderLogin_provider.hs index 4a19dc72ca4..2035720b597 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderLogin_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderLogin_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ProviderLogin_provider where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderProfile_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderProfile_provider.hs index c91ef343b3e..9af587a5845 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderProfile_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ProviderProfile_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ProviderProfile_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Provider_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Provider_provider.hs index fb632f62556..4382c70ef0c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Provider_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Provider_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Provider_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PubClient_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PubClient_user.hs index 1545e3d0a1d..8ab83c70cd5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PubClient_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PubClient_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PubClient_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushTokenList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushTokenList_user.hs index bd0982e188b..c6cc80bd52f 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushTokenList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushTokenList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PushTokenList_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushToken_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushToken_user.hs index d53531a6c5a..173449fdf76 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushToken_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/PushToken_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.PushToken_user where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Push_2eToken_2eTransport_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Push_2eToken_2eTransport_user.hs index c101f3ae628..cfaa3c1634d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Push_2eToken_2eTransport_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Push_2eToken_2eTransport_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Push_2eToken_2eTransport_user where import Wire.API.Push.Token (Transport (APNS, APNSSandbox, APNSVoIP, APNSVoIPSandbox, GCM)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QualifiedNewOtrMessage_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QualifiedNewOtrMessage_user.hs index 09a6563f2da..89378cecd15 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QualifiedNewOtrMessage_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QualifiedNewOtrMessage_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.QualifiedNewOtrMessage_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotificationList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotificationList_user.hs index 738a421752a..88824f28b1d 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotificationList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotificationList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.QueuedNotificationList_user where import Data.Aeson (Value (Bool, Null)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotification_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotification_user.hs index 63eadadcea7..ed53f27d3a6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotification_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/QueuedNotification_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.QueuedNotification_user where import Data.Aeson (Value (Array)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCConfiguration_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCConfiguration_user.hs index 9b75aa71b71..e85deefcb79 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCConfiguration_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCConfiguration_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RTCConfiguration_user where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs index ce39dbf14b8..43f99a3bd78 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RTCIceServer_user where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ReceiptMode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ReceiptMode_user.hs index 7f816e6f212..d04ce3a2e63 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ReceiptMode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ReceiptMode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ReceiptMode_user where import Wire.API.Conversation (ReceiptMode (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Relation_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Relation_user.hs index 6cc3b03726e..13dad63b9e8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Relation_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Relation_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Relation_user where import Wire.API.Connection (Relation (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveBotResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveBotResponse_user.hs index 549ca63d0dc..f801c6fa842 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveBotResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveBotResponse_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RemoveBotResponse_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveCookies_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveCookies_user.hs index b6e0eef9f29..b6b9791d9e4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveCookies_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveCookies_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RemoveCookies_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveLegalHoldSettingsRequest_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveLegalHoldSettingsRequest_team.hs index 8534ea67c3f..29e623f8814 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveLegalHoldSettingsRequest_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RemoveLegalHoldSettingsRequest_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RemoveLegalHoldSettingsRequest_team where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RequestNewLegalHoldClient_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RequestNewLegalHoldClient_team.hs index 32c14c47c9f..cf5a4252401 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RequestNewLegalHoldClient_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RequestNewLegalHoldClient_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RequestNewLegalHoldClient_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichField_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichField_user.hs index 787a9affe2e..92739ece753 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichField_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichField_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RichField_user where import Wire.API.User.RichInfo (RichField (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoAssocList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoAssocList_user.hs index 0059d41573b..79ed0746b68 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoAssocList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoAssocList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RichInfoAssocList_user where import Wire.API.User.RichInfo (RichField (RichField, richFieldType, richFieldValue), RichInfoAssocList (..), mkRichInfoAssocList) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoMapAndList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoMapAndList_user.hs index e4f9433fa1c..4612b9366e3 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoMapAndList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfoMapAndList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RichInfoMapAndList_user where import Wire.API.User.RichInfo (RichField (RichField, richFieldType, richFieldValue), RichInfoMapAndList (..), mkRichInfoMapAndList) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfo_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfo_user.hs index b15212daa63..8b539896bf7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfo_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RichInfo_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RichInfo_user where import Wire.API.User.RichInfo diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RmClient_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RmClient_user.hs index c153be52246..db42ef1d8dd 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RmClient_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RmClient_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RmClient_user where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RoleName_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RoleName_user.hs index 7c494484ded..673eae886c4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RoleName_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RoleName_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.RoleName_user where import Imports (fromJust) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Role_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Role_team.hs index 509130c68dd..8f530f4c6e5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Role_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Role_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Role_team where import Wire.API.Team.Role (Role (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SFTServer_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SFTServer_user.hs index e55074cf732..64d95ad55a1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SFTServer_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SFTServer_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SFTServer_user where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Scheme_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Scheme_user.hs index 0596abd0ccf..e0aa6703a97 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Scheme_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Scheme_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Scheme_user where import Wire.API.Call.Config (Scheme (SchemeTurn, SchemeTurns)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20Contact_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20Contact_user.hs index 568f0fdd588..1bc196350ec 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20Contact_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20Contact_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SearchResult_20Contact_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20TeamContact_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20TeamContact_user.hs index 0b72d28a0f2..678bcf4038e 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20TeamContact_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SearchResult_20TeamContact_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SearchResult_20TeamContact_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SelfProfile_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SelfProfile_user.hs index 8e5f7b6d4d5..2e751494575 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SelfProfile_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SelfProfile_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SelfProfile_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendActivationCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendActivationCode_user.hs index a431f5f6e5b..0dbfc7d6e89 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendActivationCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendActivationCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SendActivationCode_user where import Data.ISO3166_CountryCodes (CountryCode (AO, BB, FI, FR, IN, MU, PM, VI, VU)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendLoginCode_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendLoginCode_user.hs index aa267ac2855..5c9f9b3a4fa 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendLoginCode_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SendLoginCode_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SendLoginCode_user where import Imports (Bool (False, True)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyPEM_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyPEM_provider.hs index da011840338..9169cb33ab7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyPEM_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyPEM_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceKeyPEM_provider where import Data.PEM (PEM (PEM, pemContent, pemHeader, pemName)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyType_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyType_provider.hs index 041836aea2a..5b77cab512f 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyType_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKeyType_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceKeyType_provider where import Wire.API.Provider.Service (ServiceKeyType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKey_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKey_provider.hs index 2a75886e6cc..e1bc8f15cb5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKey_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceKey_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceKey_provider where import Data.PEM (PEM (PEM, pemContent, pemHeader, pemName)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfilePage_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfilePage_provider.hs index 11d7a902734..15166487c40 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfilePage_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfilePage_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceProfilePage_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfile_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfile_provider.hs index fc820bdf1d5..5c63ef3d65f 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfile_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceProfile_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceProfile_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceRef_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceRef_provider.hs index eb5e28c582b..518ee50c2a8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceRef_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceRef_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceRef_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTagList_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTagList_provider.hs index b1ef26c9686..b46143c0c32 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTagList_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTagList_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceTagList_provider where import Wire.API.Provider diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTag_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTag_provider.hs index f6f23e83e9d..89bfd98bb9a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTag_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceTag_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceTag_provider where import Wire.API.Provider diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceToken_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceToken_provider.hs index 6baa99af2f5..3ea65afc4c2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceToken_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ServiceToken_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ServiceToken_provider where import Data.Text.Ascii (AsciiChars (validate)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs index 42cf0633a08..0ab9afa0e72 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Service_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs index 7b0e1ea957b..65933ee3ef6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SimpleMember_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMembers_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMembers_user.hs index 24fdf77feba..a00349bc34b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMembers_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMembers_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.SimpleMembers_user where import Data.Domain diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamBinding_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamBinding_team.hs index fd28bdef20a..0d380578494 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamBinding_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamBinding_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamBinding_team where import Wire.API.Team (TeamBinding (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamContact_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamContact_user.hs index 55969d835ed..ea046cabe6c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamContact_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamContact_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamContact_user where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversationList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversationList_team.hs index 19d9cbe8e7e..cd03d982624 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversationList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversationList_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamConversationList_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversation_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversation_team.hs index 53485b7eaf9..2e56b99a4d6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversation_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamConversation_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamConversation_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamDeleteData_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamDeleteData_team.hs index 9341c5a5ff5..70730a57c60 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamDeleteData_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamDeleteData_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamDeleteData_team where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusNoConfig_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusNoConfig_team.hs index b0b9ee92b7d..c7c0afa9bb0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusNoConfig_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusNoConfig_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamFeatureStatusNoConfig_team where import Wire.API.Team.Feature diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusValue_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusValue_team.hs index c65943a902b..cd11bb4e13c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusValue_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusValue_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamFeatureStatusValue_team where import Wire.API.Team.Feature (TeamFeatureStatusValue (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusWithConfig_20TeamFeatureAppLockConfig_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusWithConfig_20TeamFeatureAppLockConfig_team.hs index 4013a223928..25b3d9fd610 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusWithConfig_20TeamFeatureAppLockConfig_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamFeatureStatusWithConfig_20TeamFeatureAppLockConfig_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamFeatureStatusWithConfig_20TeamFeatureAppLockConfig_team where import Imports (Bool (False, True)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs index 94f45bda194..9bf6832fbb0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamList_team where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberDeleteData_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberDeleteData_team.hs index b3e98af0cfe..8acbff26552 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberDeleteData_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberDeleteData_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamMemberDeleteData_team where import Data.Misc (PlainTextPassword (PlainTextPassword)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberList_team.hs index 5b6a14c481b..6599e08fbde 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMemberList_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamMemberList_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMember_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMember_team.hs index 395af66b78f..312248e1125 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMember_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamMember_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamMember_team where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibilityView_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibilityView_team.hs index c0826a79804..044c960b8a5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibilityView_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibilityView_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamSearchVisibilityView_team where import Wire.API.Team.SearchVisibility diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibility_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibility_team.hs index 58a6f51479c..252bd3368e2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibility_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamSearchVisibility_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamSearchVisibility_team where import Wire.API.Team.SearchVisibility (TeamSearchVisibility (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamUpdateData_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamUpdateData_team.hs index 7f918306465..223db088933 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamUpdateData_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamUpdateData_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TeamUpdateData_team where import Data.Range (unsafeRange) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs index 52c92fcdc0c..bb67fc2c4b0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Team_team where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TokenType_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TokenType_user.hs index 9eee49bf8ee..81c30c10202 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TokenType_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TokenType_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TokenType_user where import Wire.API.User.Auth (TokenType (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Token_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Token_user.hs index f0842e2490e..c4aca25dc2a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Token_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Token_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Token_user where import Wire.API.Push.Token (Token (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Transport_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Transport_user.hs index e87415c9241..e9da4b49c76 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Transport_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Transport_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Transport_user where import Wire.API.Call.Config (Transport (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnHost_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnHost_user.hs index e68df64ba86..f44b01cdceb 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnHost_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnHost_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TurnHost_user where import Data.Misc (IpAddr (IpAddr)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnURI_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnURI_user.hs index 8bab591e584..514533775e5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnURI_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnURI_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TurnURI_user where import Data.Misc (IpAddr (IpAddr)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnUsername_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnUsername_user.hs index dc7386d7079..e50112a8eb9 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnUsername_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TurnUsername_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TurnUsername_user where import Control.Lens ((.~)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingData_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingData_user.hs index d841b01ec4e..86b17dbc9e0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingData_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingData_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TypingData_user where import Wire.API.Conversation.Typing (TypingData (..), TypingStatus (StartedTyping)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingStatus_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingStatus_user.hs index 3d874cbe6a6..20a639e0cc8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingStatus_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TypingStatus_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.TypingStatus_user where import Wire.API.Conversation.Typing (TypingStatus (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateBotPrekeys_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateBotPrekeys_user.hs index 67ce17c03df..00887203335 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateBotPrekeys_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateBotPrekeys_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateBotPrekeys_user where import Wire.API.Conversation.Bot (UpdateBotPrekeys (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateClient_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateClient_user.hs index 81bec96bb33..b627f7eb993 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateClient_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateClient_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateClient_user where import Imports (Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateProvider_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateProvider_provider.hs index 5ba8e3afa70..17aadf0299f 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateProvider_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateProvider_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateProvider_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceConn_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceConn_provider.hs index 93dffc64d60..c9d1c278fc4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceConn_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceConn_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateServiceConn_provider where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceWhitelist_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceWhitelist_provider.hs index cec82bf4200..dd869245db4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceWhitelist_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateServiceWhitelist_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateServiceWhitelist_provider where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs index fb3e98ba7f6..cc37255a820 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UpdateService_provider where import Data.Range (unsafeRange) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClientMap_20Int_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClientMap_20Int_user.hs index b3c5d4e2230..724b8e77702 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClientMap_20Int_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClientMap_20Int_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserClientMap_20Int_user where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClients_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClients_user.hs index 1ccf3f76ba4..0c466b8f9df 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClients_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserClients_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserClients_user where import Data.Id (ClientId (ClientId, client), Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnectionList_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnectionList_user.hs index f28c6ab012b..66488b48562 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnectionList_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnectionList_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserConnectionList_user where import Data.Domain (Domain (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnection_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnection_user.hs index f78185c0864..7d74b9ab302 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnection_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserConnection_user.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserConnection_user where import Data.Domain (Domain (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserHandleInfo_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserHandleInfo_user.hs index e7eca53d547..2aff5c89445 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserHandleInfo_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserHandleInfo_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserHandleInfo_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs index 19d70db4709..27eb1367250 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserIdentity_user where import Imports (Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserLegalHoldStatusResponse_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserLegalHoldStatusResponse_team.hs index 13cd3c97ca3..ca31e4c871a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserLegalHoldStatusResponse_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserLegalHoldStatusResponse_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserLegalHoldStatusResponse_team where import Data.Id (ClientId (ClientId, client)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserProfile_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserProfile_user.hs index e1586dde396..a86e71ad20a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserProfile_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserProfile_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserProfile_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserSSOId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserSSOId_user.hs index 51d29bcd37b..80bfb7fa5a7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserSSOId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserSSOId_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserSSOId_user where import Wire.API.User (UserSSOId (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserUpdate_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserUpdate_user.hs index 224e125bbf1..04e007b4407 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserUpdate_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserUpdate_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.UserUpdate_user where import Imports (Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_2eProfile_2eAsset_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_2eProfile_2eAsset_user.hs index 0a929fa0888..c5abaead6e8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_2eProfile_2eAsset_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_2eProfile_2eAsset_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.User_2eProfile_2eAsset_user where import Imports (Maybe (Just, Nothing)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_user.hs index a6cf67b39c5..a996f61f1c3 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/User_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.User_user where import Data.Domain (Domain (Domain, _domainText)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/VerifyDeleteUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/VerifyDeleteUser_user.hs index bc80c6fe608..6b9aee78d90 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/VerifyDeleteUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/VerifyDeleteUser_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.VerifyDeleteUser_user where import Data.Code (Key (Key, asciiKey), Value (Value, asciiValue)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldServiceInfo_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldServiceInfo_team.hs index c8e4258e555..e4a5fadd26c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldServiceInfo_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldServiceInfo_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ViewLegalHoldServiceInfo_team where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldService_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldService_team.hs index 43eaae23aae..5a584d4602a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldService_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ViewLegalHoldService_team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.ViewLegalHoldService_team where import Data.Coerce (coerce) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Wrapped_20_22some_5fint_22_20Int_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Wrapped_20_22some_5fint_22_20Int_user.hs index bc62c71e14b..080ce84d621 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Wrapped_20_22some_5fint_22_20Int_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Wrapped_20_22some_5fint_22_20Int_user.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -16,6 +16,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.Wrapped_20_22some_5fint_22_20Int_user where import Imports (Int) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generator.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generator.hs index 5416af10400..1ee865a4440 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generator.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generator.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -154,7 +154,6 @@ generateTestModule = do generateBindingModule @(Conversation.ConversationList ConvId) "user" ref generateBindingModule @(Conversation.ConversationList Conversation.Conversation) "user" ref generateBindingModule @Conversation.Access "user" ref - generateBindingModule @Conversation.AccessRole "user" ref generateBindingModule @Conversation.ConvType "user" ref generateBindingModule @Conversation.ReceiptMode "user" ref generateBindingModule @Conversation.ConvTeamInfo "user" ref diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual.hs index e4edd42411b..f1bff97d4d5 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapability.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapability.hs index 79f87a1bdf9..f739ad108e1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapability.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapability.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapabilityList.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapabilityList.hs index 5a2802ba75c..0dab93727b6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapabilityList.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ClientCapabilityList.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConvIdsPage.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConvIdsPage.hs index e81ba688147..25bde43b52a 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConvIdsPage.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConvIdsPage.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.ConvIdsPage where import Data.Domain (Domain (Domain)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationCoverView.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationCoverView.hs index a905aae05de..20a030b87e1 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationCoverView.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationCoverView.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + -- | module Test.Wire.API.Golden.Manual.ConversationCoverView where diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationPagingState.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationPagingState.hs index 4e8c857e6c6..82862c3d745 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationPagingState.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationPagingState.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.ConversationPagingState where import qualified Data.ByteString as BS diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationsResponse.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationsResponse.hs index 1210c3687ae..0c20d3d7c15 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationsResponse.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationsResponse.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.ConversationsResponse ( testObject_ConversationsResponse_1, ) @@ -7,6 +24,7 @@ import Data.Domain import Data.Id (Id (Id)) import Data.Misc import Data.Qualified +import qualified Data.Set as Set import qualified Data.UUID as UUID import Imports import Wire.API.Conversation @@ -38,7 +56,7 @@ conv1 = { cnvmType = One2OneConv, cnvmCreator = Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000001")), cnvmAccess = [], - cnvmAccessRole = PrivateAccessRole, + cnvmAccessRoles = Set.empty, cnvmName = Just " 0", cnvmTeam = Just (Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000002"))), cnvmMessageTimer = Nothing, @@ -84,7 +102,7 @@ conv2 = PrivateAccess, InviteAccess ], - cnvmAccessRole = NonActivatedAccessRole, + cnvmAccessRoles = Set.fromList [TeamMemberAccessRole, GuestAccessRole, ServiceAccessRole], cnvmName = Just "", cnvmTeam = Just (Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000200000000"))), cnvmMessageTimer = Just (Ms {ms = 1319272593797015}), diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/FeatureConfigEvent.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/FeatureConfigEvent.hs index 2e5f9f85d3f..8f4ef349dd6 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/FeatureConfigEvent.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/FeatureConfigEvent.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.FeatureConfigEvent where import Imports diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/GetPaginatedConversationIds.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/GetPaginatedConversationIds.hs index 18459c57b3b..0c940b2d086 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/GetPaginatedConversationIds.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/GetPaginatedConversationIds.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.GetPaginatedConversationIds where import Data.Proxy diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ListConversations.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ListConversations.hs index c10a79ddfd5..cb0c08072a3 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ListConversations.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ListConversations.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/QualifiedUserClientPrekeyMap.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/QualifiedUserClientPrekeyMap.hs index 4d100393996..8f25987a882 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/QualifiedUserClientPrekeyMap.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/QualifiedUserClientPrekeyMap.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserClientPrekeyMap.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserClientPrekeyMap.hs index c1751973c2d..6332462f026 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserClientPrekeyMap.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserClientPrekeyMap.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserIdList.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserIdList.hs index ab184f7bcf5..f102d9e72de 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserIdList.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserIdList.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Golden.Manual.UserIdList where import Data.Id (Id (Id)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Protobuf.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Protobuf.hs index 47066a8c205..68ca704e7cc 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Protobuf.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Protobuf.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs index 8e0f1ce3486..0e3ea5512b0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/fromJSON/testObject_NewConvUnmanaged_user_1.json b/libs/wire-api/test/golden/fromJSON/testObject_NewConvUnmanaged_user_1.json index edf0282f535..f58dad1b1a9 100644 --- a/libs/wire-api/test/golden/fromJSON/testObject_NewConvUnmanaged_user_1.json +++ b/libs/wire-api/test/golden/fromJSON/testObject_NewConvUnmanaged_user_1.json @@ -3,7 +3,10 @@ "private", "invite" ], - "access_role": "activated", + "access_role_v2": [ + "team_member", + "guest" + ], "users": [ "00000001-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000000" @@ -16,4 +19,4 @@ "receipt_mode": 1, "message_timer": 3320987366258987, "qualified_users": [] -} \ No newline at end of file +} diff --git a/libs/wire-api/test/golden/testObject_AccessRole_user_1.json b/libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_1.json similarity index 100% rename from libs/wire-api/test/golden/testObject_AccessRole_user_1.json rename to libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_1.json diff --git a/libs/wire-api/test/golden/testObject_AccessRole_user_2.json b/libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_2.json similarity index 100% rename from libs/wire-api/test/golden/testObject_AccessRole_user_2.json rename to libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_2.json diff --git a/libs/wire-api/test/golden/testObject_AccessRole_user_3.json b/libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_3.json similarity index 100% rename from libs/wire-api/test/golden/testObject_AccessRole_user_3.json rename to libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_3.json diff --git a/libs/wire-api/test/golden/testObject_AccessRole_user_4.json b/libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_4.json similarity index 100% rename from libs/wire-api/test/golden/testObject_AccessRole_user_4.json rename to libs/wire-api/test/golden/testObject_AccessRoleLegacy_user_4.json diff --git a/libs/wire-api/test/golden/testObject_ConversationAccessData_user_1.json b/libs/wire-api/test/golden/testObject_ConversationAccessData_user_1.json index 5da5d4b0788..68a20bbafe3 100644 --- a/libs/wire-api/test/golden/testObject_ConversationAccessData_user_1.json +++ b/libs/wire-api/test/golden/testObject_ConversationAccessData_user_1.json @@ -1,4 +1,9 @@ { "access": [], - "access_role": "non_activated" + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest", + "service" + ] } diff --git a/libs/wire-api/test/golden/testObject_ConversationAccessData_user_2.json b/libs/wire-api/test/golden/testObject_ConversationAccessData_user_2.json index 2a272fa6748..74e7d6e6d2e 100644 --- a/libs/wire-api/test/golden/testObject_ConversationAccessData_user_2.json +++ b/libs/wire-api/test/golden/testObject_ConversationAccessData_user_2.json @@ -2,5 +2,9 @@ "access": [ "invite" ], - "access_role": "activated" + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest" + ] } diff --git a/libs/wire-api/test/golden/testObject_ConversationList_20Conversation_user_1.json b/libs/wire-api/test/golden/testObject_ConversationList_20Conversation_user_1.json index ceccfb14fc5..8e0218b16ea 100644 --- a/libs/wire-api/test/golden/testObject_ConversationList_20Conversation_user_1.json +++ b/libs/wire-api/test/golden/testObject_ConversationList_20Conversation_user_1.json @@ -3,6 +3,7 @@ { "access": [], "access_role": "private", + "access_role_v2": [], "creator": "00000000-0000-0000-0000-000000000001", "id": "00000001-0000-0000-0000-000000000000", "last_event": "0.0", diff --git a/libs/wire-api/test/golden/testObject_Conversation_user_1.json b/libs/wire-api/test/golden/testObject_Conversation_user_1.json index 22dcd63af64..a1c782e286a 100644 --- a/libs/wire-api/test/golden/testObject_Conversation_user_1.json +++ b/libs/wire-api/test/golden/testObject_Conversation_user_1.json @@ -1,6 +1,7 @@ { "access": [], "access_role": "private", + "access_role_v2": [], "creator": "00000001-0000-0001-0000-000200000001", "id": "00000001-0000-0000-0000-000000000000", "last_event": "0.0", diff --git a/libs/wire-api/test/golden/testObject_Conversation_user_2.json b/libs/wire-api/test/golden/testObject_Conversation_user_2.json index 7c2362da23f..2b52df51b68 100644 --- a/libs/wire-api/test/golden/testObject_Conversation_user_2.json +++ b/libs/wire-api/test/golden/testObject_Conversation_user_2.json @@ -14,6 +14,11 @@ "invite" ], "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest", + "service" + ], "creator": "00000000-0000-0000-0000-000200000001", "id": "00000000-0000-0000-0000-000000000002", "last_event": "0.0", diff --git a/libs/wire-api/test/golden/testObject_ConversationsResponse_1.json b/libs/wire-api/test/golden/testObject_ConversationsResponse_1.json index db6807e12db..2a8a47b4c72 100644 --- a/libs/wire-api/test/golden/testObject_ConversationsResponse_1.json +++ b/libs/wire-api/test/golden/testObject_ConversationsResponse_1.json @@ -13,6 +13,7 @@ { "access": [], "access_role": "private", + "access_role_v2": [], "creator": "00000001-0000-0001-0000-000200000001", "id": "00000001-0000-0000-0000-000000000000", "last_event": "0.0", @@ -64,6 +65,11 @@ "invite" ], "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest", + "service" + ], "creator": "00000000-0000-0000-0000-000200000001", "id": "00000000-0000-0000-0000-000000000002", "last_event": "0.0", diff --git a/libs/wire-api/test/golden/testObject_Event_user_2.json b/libs/wire-api/test/golden/testObject_Event_user_2.json index 9a4665f8c08..7477dd4406b 100644 --- a/libs/wire-api/test/golden/testObject_Event_user_2.json +++ b/libs/wire-api/test/golden/testObject_Event_user_2.json @@ -6,7 +6,11 @@ "invite", "link" ], - "access_role": "activated" + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest" + ] }, "from": "00006a88-0000-2acb-0000-6aa0000061b2", "qualified_conversation": { diff --git a/libs/wire-api/test/golden/testObject_Event_user_8.json b/libs/wire-api/test/golden/testObject_Event_user_8.json index ecfc1b3da8d..6807fd809ad 100644 --- a/libs/wire-api/test/golden/testObject_Event_user_8.json +++ b/libs/wire-api/test/golden/testObject_Event_user_8.json @@ -11,6 +11,11 @@ "link" ], "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest", + "service" + ], "creator": "00000000-0000-0000-0000-000200000001", "id": "00000000-0000-0000-0000-000100000001", "last_event": "0.0", diff --git a/libs/wire-api/test/golden/testObject_NewConvManaged_user_1.json b/libs/wire-api/test/golden/testObject_NewConvManaged_user_1.json index 8c58bba7df4..7772dcde548 100644 --- a/libs/wire-api/test/golden/testObject_NewConvManaged_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewConvManaged_user_1.json @@ -1,6 +1,10 @@ { "access": [], - "access_role": "activated", + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest" + ], "conversation_role": "37q9eeybycp5972td4oo9_r7y16eh6n67z5spda8sffy8qv", "message_timer": 193643728192048, "qualified_users": [], diff --git a/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_1.json b/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_1.json index e063552c1d3..f2dc14a6af9 100644 --- a/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_1.json @@ -3,7 +3,11 @@ "private", "invite" ], - "access_role": "activated", + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest" + ], "conversation_role": "8tp2gs7b6", "message_timer": 3320987366258987, "qualified_users": [], diff --git a/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_3.json b/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_3.json index 0ccab7664d5..62f3d801c26 100644 --- a/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_3.json +++ b/libs/wire-api/test/golden/testObject_NewConvUnmanaged_user_3.json @@ -4,7 +4,11 @@ "link", "code" ], - "access_role": "activated", + "access_role": "non_activated", + "access_role_v2": [ + "team_member", + "guest" + ], "conversation_role": "y3otpiwu615lvvccxsq0315jj75jquw01flhtuf49t6mzfurvwe3_sh51f4s257e2x47zo85rif_xyiyfldpan3g4r6zr35rbwnzm0k", "qualified_users": [], "users": [] diff --git a/libs/wire-api/test/unit/Main.hs b/libs/wire-api/test/unit/Main.hs index 540037b6e0a..a2ab670a85f 100644 --- a/libs/wire-api/test/unit/Main.hs +++ b/libs/wire-api/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -23,6 +23,7 @@ where import Imports import Test.Tasty import qualified Test.Wire.API.Call.Config as Call.Config +import qualified Test.Wire.API.Conversation as Conversation import qualified Test.Wire.API.Roundtrip.Aeson as Roundtrip.Aeson import qualified Test.Wire.API.Roundtrip.ByteString as Roundtrip.ByteString import qualified Test.Wire.API.Roundtrip.CSV as Roundtrip.CSV @@ -47,5 +48,6 @@ main = Roundtrip.ByteString.tests, Swagger.tests, Roundtrip.CSV.tests, - Routes.tests + Routes.tests, + Conversation.tests ] diff --git a/libs/wire-api/test/unit/Test/Wire/API/Call/Config.hs b/libs/wire-api/test/unit/Test/Wire/API/Call/Config.hs index 9394f8bd32d..ac101293574 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Call/Config.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Call/Config.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs b/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs new file mode 100644 index 00000000000..27d198a22f1 --- /dev/null +++ b/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs @@ -0,0 +1,53 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# OPTIONS_GHC -Wno-orphans #-} + +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2020 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module Test.Wire.API.Conversation where + +import qualified Data.Set as Set +import Imports +import Test.Tasty +import Test.Tasty.QuickCheck (testProperty, (===)) +import Wire.API.Conversation + +tests :: TestTree +tests = + testGroup + "Conversation" + [ accessRoleFromLegacyToV2ToLegacy, + accessRoleFromV2ToLegacyToV2 + ] + +accessRoleFromLegacyToV2ToLegacy :: TestTree +accessRoleFromLegacyToV2ToLegacy = testProperty "Access role conversion from legacy to v2 to legacy" p + where + p accessRoleLegacy = + accessRoleLegacy === (toAccessRoleLegacy . fromAccessRoleLegacy) accessRoleLegacy + +accessRoleFromV2ToLegacyToV2 :: TestTree +accessRoleFromV2ToLegacyToV2 = + testProperty "Access role conversion from v2 to legacy to v2 - original should be a subset of roundtrip converted" p + where + p originalV2 = originalIsSubSetOfConverted && noSmallerLegacyIsSubsetOfOriginal + where + convertedToLegacy = toAccessRoleLegacy originalV2 + convertedBackToV2 = fromAccessRoleLegacy convertedToLegacy + originalIsSubSetOfConverted = originalV2 `Set.isSubsetOf` convertedBackToV2 + smallerLegacy = fromAccessRoleLegacy <$> init [minBound .. convertedToLegacy] + noSmallerLegacyIsSubsetOfOriginal = not (any (originalV2 `Set.isSubsetOf`) smallerLegacy) diff --git a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs index a3d5e85f7e8..03a2b24609b 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -99,7 +99,8 @@ tests = testRoundTrip @(Conversation.ConversationList ConvId), testRoundTrip @(Conversation.ConversationList Conversation.Conversation), testRoundTrip @Conversation.Access, - testRoundTrip @Conversation.AccessRole, + testRoundTrip @Conversation.AccessRoleLegacy, + testRoundTrip @Conversation.AccessRoleV2, testRoundTrip @Conversation.ConvType, testRoundTrip @Conversation.ReceiptMode, testRoundTrip @Conversation.ConvTeamInfo, @@ -109,6 +110,7 @@ tests = testRoundTrip @Conversation.ConversationAccessData, testRoundTrip @Conversation.ConversationReceiptModeUpdate, testRoundTrip @Conversation.ConversationMessageTimerUpdate, + testRoundTrip @Conversation.ConversationMetadata, testRoundTrip @Conversation.Bot.AddBot, testRoundTrip @Conversation.Bot.AddBotResponse, testRoundTrip @Conversation.Bot.RemoveBotResponse, diff --git a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/ByteString.hs b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/ByteString.hs index 4e2fe631baf..6e910b9fd70 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/ByteString.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/ByteString.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/CSV.hs b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/CSV.hs index 101508215df..3585739dab4 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/CSV.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/CSV.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/Routes.hs b/libs/wire-api/test/unit/Test/Wire/API/Routes.hs index 0c28074f69e..ede1642c79c 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Routes.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Routes.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Wire.API.Routes where import Data.Metrics.Servant diff --git a/libs/wire-api/test/unit/Test/Wire/API/Swagger.hs b/libs/wire-api/test/unit/Test/Wire/API/Swagger.hs index 0d3fcff0c08..3b86dcfead0 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Swagger.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Swagger.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/Team/Member.hs b/libs/wire-api/test/unit/Test/Wire/API/Team/Member.hs index 96db3299fce..bbe61f9c30d 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Team/Member.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Team/Member.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/User.hs b/libs/wire-api/test/unit/Test/Wire/API/User.hs index cea7b4f227e..2b239055597 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/User.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/User.hs @@ -1,9 +1,8 @@ -{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -34,13 +33,13 @@ import Test.Tasty.HUnit import Wire.API.User tests :: TestTree -tests = testGroup "User (types vs. aeson)" $ unitTests +tests = testGroup "User (types vs. aeson)" unitTests unitTests :: [TestTree] unitTests = parseIdentityTests ++ jsonNullTests jsonNullTests :: [TestTree] -jsonNullTests = [testGroup "JSON null" [testCase "userProfile" $ testUserProfile]] +jsonNullTests = [testGroup "JSON null" [testCase "userProfile" testUserProfile]] testUserProfile :: Assertion testUserProfile = do diff --git a/libs/wire-api/test/unit/Test/Wire/API/User/RichInfo.hs b/libs/wire-api/test/unit/Test/Wire/API/User/RichInfo.hs index a8c2e78842f..64a71acbabc 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/User/RichInfo.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/User/RichInfo.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -161,7 +161,7 @@ moreRichInfoNormalizationTests = y = (fromRichInfoAssocList . toRichInfoAssocList) x assertEqual mempty (toRichInfoAssocList x) (toRichInfoAssocList y), testProperty "works (property)" $ \(someAssocs :: RichInfoAssocList) -> - (jsonroundtrip someAssocs) === someAssocs + jsonroundtrip someAssocs === someAssocs .&&. (toRichInfoAssocList . fromRichInfoAssocList $ someAssocs) === someAssocs .&&. (toRichInfoAssocList . jsonroundtrip . fromRichInfoAssocList $ someAssocs) === someAssocs ] diff --git a/libs/wire-api/test/unit/Test/Wire/API/User/Search.hs b/libs/wire-api/test/unit/Test/Wire/API/User/Search.hs index 883145681f2..bfccbdac7d4 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/User/Search.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/User/Search.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/wire-api.cabal b/libs/wire-api/wire-api.cabal index 7da197c9c5b..89857ca6b45 100644 --- a/libs/wire-api/wire-api.cabal +++ b/libs/wire-api/wire-api.cabal @@ -226,7 +226,7 @@ test-suite wire-api-golden-tests Test.Wire.API.Golden.FromJSON Test.Wire.API.Golden.Generated Test.Wire.API.Golden.Generated.Access_user - Test.Wire.API.Golden.Generated.AccessRole_user + Test.Wire.API.Golden.Generated.AccessRoleLegacy_user Test.Wire.API.Golden.Generated.AccessToken_user Test.Wire.API.Golden.Generated.Action_user Test.Wire.API.Golden.Generated.Activate_user @@ -552,6 +552,7 @@ test-suite wire-api-tests main-is: Main.hs other-modules: Test.Wire.API.Call.Config + Test.Wire.API.Conversation Test.Wire.API.Roundtrip.Aeson Test.Wire.API.Roundtrip.ByteString Test.Wire.API.Roundtrip.CSV diff --git a/libs/wire-message-proto-lens/Setup.hs b/libs/wire-message-proto-lens/Setup.hs index 7619bdd442e..63cde81b765 100644 --- a/libs/wire-message-proto-lens/Setup.hs +++ b/libs/wire-message-proto-lens/Setup.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/main/Main.hs b/libs/zauth/main/Main.hs index 924804b2d84..61e00e41933 100644 --- a/libs/zauth/main/Main.hs +++ b/libs/zauth/main/Main.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/src/Data/ZAuth/Creation.hs b/libs/zauth/src/Data/ZAuth/Creation.hs index b3dc42126b0..003dd4c2598 100644 --- a/libs/zauth/src/Data/ZAuth/Creation.hs +++ b/libs/zauth/src/Data/ZAuth/Creation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/src/Data/ZAuth/Token.hs b/libs/zauth/src/Data/ZAuth/Token.hs index 33ab055b67e..52ea198c456 100644 --- a/libs/zauth/src/Data/ZAuth/Token.hs +++ b/libs/zauth/src/Data/ZAuth/Token.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/src/Data/ZAuth/Validation.hs b/libs/zauth/src/Data/ZAuth/Validation.hs index 6f514d10eca..6bafd2e87ea 100644 --- a/libs/zauth/src/Data/ZAuth/Validation.hs +++ b/libs/zauth/src/Data/ZAuth/Validation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/test/Arbitraries.hs b/libs/zauth/test/Arbitraries.hs index 8f9be0726ed..bb17ae9b58d 100644 --- a/libs/zauth/test/Arbitraries.hs +++ b/libs/zauth/test/Arbitraries.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/test/Unit.hs b/libs/zauth/test/Unit.hs index f363d8b48b9..0de631ec17e 100644 --- a/libs/zauth/test/Unit.hs +++ b/libs/zauth/test/Unit.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/zauth/test/ZAuth.hs b/libs/zauth/test/ZAuth.hs index 65dbd8b4c83..13c2de15611 100644 --- a/libs/zauth/test/ZAuth.hs +++ b/libs/zauth/test/ZAuth.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/Setup.hs b/services/brig/Setup.hs index ce0b496ab7c..bebc423002b 100644 --- a/services/brig/Setup.hs +++ b/services/brig/Setup.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/index/src/Main.hs b/services/brig/index/src/Main.hs index 4837a9b01b2..efdae18c2a3 100644 --- a/services/brig/index/src/Main.hs +++ b/services/brig/index/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/Main.hs b/services/brig/schema/src/Main.hs index 9256b8e2ba2..01ab2e38a4d 100644 --- a/services/brig/schema/src/Main.hs +++ b/services/brig/schema/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V10.hs b/services/brig/schema/src/V10.hs index 652fb09257c..ee254706c5b 100644 --- a/services/brig/schema/src/V10.hs +++ b/services/brig/schema/src/V10.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V11.hs b/services/brig/schema/src/V11.hs index d619fd343d3..52d65e926fa 100644 --- a/services/brig/schema/src/V11.hs +++ b/services/brig/schema/src/V11.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V12.hs b/services/brig/schema/src/V12.hs index 26e0bebdcec..c1195e9fdd7 100644 --- a/services/brig/schema/src/V12.hs +++ b/services/brig/schema/src/V12.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V13.hs b/services/brig/schema/src/V13.hs index 1fe44c59052..ce17a5fda6c 100644 --- a/services/brig/schema/src/V13.hs +++ b/services/brig/schema/src/V13.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V14.hs b/services/brig/schema/src/V14.hs index 2fd91ec15a7..40ada092cd9 100644 --- a/services/brig/schema/src/V14.hs +++ b/services/brig/schema/src/V14.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V15.hs b/services/brig/schema/src/V15.hs index e13d81d9927..485304b56e8 100644 --- a/services/brig/schema/src/V15.hs +++ b/services/brig/schema/src/V15.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V16.hs b/services/brig/schema/src/V16.hs index 75d95372acf..2601277699b 100644 --- a/services/brig/schema/src/V16.hs +++ b/services/brig/schema/src/V16.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V17.hs b/services/brig/schema/src/V17.hs index ea456eb6125..07b42e7f75f 100644 --- a/services/brig/schema/src/V17.hs +++ b/services/brig/schema/src/V17.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V18.hs b/services/brig/schema/src/V18.hs index 67e3fa81690..f82bb74cf1a 100644 --- a/services/brig/schema/src/V18.hs +++ b/services/brig/schema/src/V18.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V19.hs b/services/brig/schema/src/V19.hs index ea2db36c2ed..47aec633e48 100644 --- a/services/brig/schema/src/V19.hs +++ b/services/brig/schema/src/V19.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V20.hs b/services/brig/schema/src/V20.hs index 5cde0af9179..1ab8756f69a 100644 --- a/services/brig/schema/src/V20.hs +++ b/services/brig/schema/src/V20.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V21.hs b/services/brig/schema/src/V21.hs index d68ae2ed9d8..0e3a9becf18 100644 --- a/services/brig/schema/src/V21.hs +++ b/services/brig/schema/src/V21.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V22.hs b/services/brig/schema/src/V22.hs index e77e6d3486a..c9fc9a8cac1 100644 --- a/services/brig/schema/src/V22.hs +++ b/services/brig/schema/src/V22.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V23.hs b/services/brig/schema/src/V23.hs index 4bc3eac8485..22145120988 100644 --- a/services/brig/schema/src/V23.hs +++ b/services/brig/schema/src/V23.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V24.hs b/services/brig/schema/src/V24.hs index cec84435d9c..a080397369b 100644 --- a/services/brig/schema/src/V24.hs +++ b/services/brig/schema/src/V24.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V25.hs b/services/brig/schema/src/V25.hs index 7c3daa1e8bb..bbafe532b98 100644 --- a/services/brig/schema/src/V25.hs +++ b/services/brig/schema/src/V25.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V28.hs b/services/brig/schema/src/V28.hs index 6614308680b..aa4248485c0 100644 --- a/services/brig/schema/src/V28.hs +++ b/services/brig/schema/src/V28.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V29.hs b/services/brig/schema/src/V29.hs index 539f4627ab0..3a371af08ac 100644 --- a/services/brig/schema/src/V29.hs +++ b/services/brig/schema/src/V29.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V30.hs b/services/brig/schema/src/V30.hs index 036e3d316e8..f0927093615 100644 --- a/services/brig/schema/src/V30.hs +++ b/services/brig/schema/src/V30.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V31.hs b/services/brig/schema/src/V31.hs index b672b53ba38..2ff9f63ffa5 100644 --- a/services/brig/schema/src/V31.hs +++ b/services/brig/schema/src/V31.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V32.hs b/services/brig/schema/src/V32.hs index ee7ddcdbf08..83d31d95072 100644 --- a/services/brig/schema/src/V32.hs +++ b/services/brig/schema/src/V32.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V33.hs b/services/brig/schema/src/V33.hs index 9f801058b3c..4daf85ddaba 100644 --- a/services/brig/schema/src/V33.hs +++ b/services/brig/schema/src/V33.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V34.hs b/services/brig/schema/src/V34.hs index 241c92f1478..8fffe0e8435 100644 --- a/services/brig/schema/src/V34.hs +++ b/services/brig/schema/src/V34.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V35.hs b/services/brig/schema/src/V35.hs index 7f923cd4992..0a8a197f64a 100644 --- a/services/brig/schema/src/V35.hs +++ b/services/brig/schema/src/V35.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V36.hs b/services/brig/schema/src/V36.hs index c3707eff69a..97f71bfbbb0 100644 --- a/services/brig/schema/src/V36.hs +++ b/services/brig/schema/src/V36.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V37.hs b/services/brig/schema/src/V37.hs index 4ae3a6b112e..afc5c0032e0 100644 --- a/services/brig/schema/src/V37.hs +++ b/services/brig/schema/src/V37.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V38.hs b/services/brig/schema/src/V38.hs index 931d88dc18c..6eca54ec75b 100644 --- a/services/brig/schema/src/V38.hs +++ b/services/brig/schema/src/V38.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V39.hs b/services/brig/schema/src/V39.hs index 1524ef21ee6..2a9ec5b7e25 100644 --- a/services/brig/schema/src/V39.hs +++ b/services/brig/schema/src/V39.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V40.hs b/services/brig/schema/src/V40.hs index cff767f2c48..62b2f0fddd2 100644 --- a/services/brig/schema/src/V40.hs +++ b/services/brig/schema/src/V40.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V41.hs b/services/brig/schema/src/V41.hs index c751ea69448..0d86c8fbe97 100644 --- a/services/brig/schema/src/V41.hs +++ b/services/brig/schema/src/V41.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V42.hs b/services/brig/schema/src/V42.hs index 38fcd0c3b9d..708134320b4 100644 --- a/services/brig/schema/src/V42.hs +++ b/services/brig/schema/src/V42.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V43.hs b/services/brig/schema/src/V43.hs index ca997a43dbb..842461bdb38 100644 --- a/services/brig/schema/src/V43.hs +++ b/services/brig/schema/src/V43.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V44.hs b/services/brig/schema/src/V44.hs index 37c21a4705a..f441fa08e45 100644 --- a/services/brig/schema/src/V44.hs +++ b/services/brig/schema/src/V44.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V45.hs b/services/brig/schema/src/V45.hs index cc74b2ba858..bd6317f5192 100644 --- a/services/brig/schema/src/V45.hs +++ b/services/brig/schema/src/V45.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V46.hs b/services/brig/schema/src/V46.hs index 9756d099850..bbb06e2a9d2 100644 --- a/services/brig/schema/src/V46.hs +++ b/services/brig/schema/src/V46.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V47.hs b/services/brig/schema/src/V47.hs index 120767dd91a..98a924ce891 100644 --- a/services/brig/schema/src/V47.hs +++ b/services/brig/schema/src/V47.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V48.hs b/services/brig/schema/src/V48.hs index a331e87e39d..c8b984b1f6c 100644 --- a/services/brig/schema/src/V48.hs +++ b/services/brig/schema/src/V48.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V49.hs b/services/brig/schema/src/V49.hs index 68b303ae013..0d20e87f620 100644 --- a/services/brig/schema/src/V49.hs +++ b/services/brig/schema/src/V49.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V50.hs b/services/brig/schema/src/V50.hs index 7ae41c107b2..f0c3914c454 100644 --- a/services/brig/schema/src/V50.hs +++ b/services/brig/schema/src/V50.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V51.hs b/services/brig/schema/src/V51.hs index f444ae52c5a..e8f4d1846c3 100644 --- a/services/brig/schema/src/V51.hs +++ b/services/brig/schema/src/V51.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V52.hs b/services/brig/schema/src/V52.hs index 6e06d34c4b7..6ec1beccf8c 100644 --- a/services/brig/schema/src/V52.hs +++ b/services/brig/schema/src/V52.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V53.hs b/services/brig/schema/src/V53.hs index 30dcac109c1..a76f3d10936 100644 --- a/services/brig/schema/src/V53.hs +++ b/services/brig/schema/src/V53.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V54.hs b/services/brig/schema/src/V54.hs index abdb2e8605e..245dd9efb99 100644 --- a/services/brig/schema/src/V54.hs +++ b/services/brig/schema/src/V54.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V55.hs b/services/brig/schema/src/V55.hs index c5730cfa4bd..fb92b32cf3c 100644 --- a/services/brig/schema/src/V55.hs +++ b/services/brig/schema/src/V55.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V56.hs b/services/brig/schema/src/V56.hs index 8feae3ee6f6..f6b629cc144 100644 --- a/services/brig/schema/src/V56.hs +++ b/services/brig/schema/src/V56.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V57.hs b/services/brig/schema/src/V57.hs index d352479236e..d3a58275925 100644 --- a/services/brig/schema/src/V57.hs +++ b/services/brig/schema/src/V57.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V58.hs b/services/brig/schema/src/V58.hs index b97df895b70..57b9c750434 100644 --- a/services/brig/schema/src/V58.hs +++ b/services/brig/schema/src/V58.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V59.hs b/services/brig/schema/src/V59.hs index 63947cb857f..b84a2f7ef26 100644 --- a/services/brig/schema/src/V59.hs +++ b/services/brig/schema/src/V59.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V60_AddFederationIdMapping.hs b/services/brig/schema/src/V60_AddFederationIdMapping.hs index 3bdc5459f63..5fb5e21a358 100644 --- a/services/brig/schema/src/V60_AddFederationIdMapping.hs +++ b/services/brig/schema/src/V60_AddFederationIdMapping.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V61_team_invitation_email.hs b/services/brig/schema/src/V61_team_invitation_email.hs index 6f122e8c8fd..81b0b911de6 100644 --- a/services/brig/schema/src/V61_team_invitation_email.hs +++ b/services/brig/schema/src/V61_team_invitation_email.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V62_RemoveFederationIdMapping.hs b/services/brig/schema/src/V62_RemoveFederationIdMapping.hs index 86f56376861..99670d3fed6 100644 --- a/services/brig/schema/src/V62_RemoveFederationIdMapping.hs +++ b/services/brig/schema/src/V62_RemoveFederationIdMapping.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V63_AddUsersPendingActivation.hs b/services/brig/schema/src/V63_AddUsersPendingActivation.hs index 211ddc9f88f..a4d1752a63f 100644 --- a/services/brig/schema/src/V63_AddUsersPendingActivation.hs +++ b/services/brig/schema/src/V63_AddUsersPendingActivation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V64_ClientCapabilities.hs b/services/brig/schema/src/V64_ClientCapabilities.hs index d8d382fc138..eda30ee4e82 100644 --- a/services/brig/schema/src/V64_ClientCapabilities.hs +++ b/services/brig/schema/src/V64_ClientCapabilities.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V65_FederatedConnections.hs b/services/brig/schema/src/V65_FederatedConnections.hs index c67af2c1a7c..6d92a633170 100644 --- a/services/brig/schema/src/V65_FederatedConnections.hs +++ b/services/brig/schema/src/V65_FederatedConnections.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V66_PersonalFeatureConfCallInit.hs b/services/brig/schema/src/V66_PersonalFeatureConfCallInit.hs index 3c915cf40a5..53cb70ef706 100644 --- a/services/brig/schema/src/V66_PersonalFeatureConfCallInit.hs +++ b/services/brig/schema/src/V66_PersonalFeatureConfCallInit.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/schema/src/V9.hs b/services/brig/schema/src/V9.hs index 02e462d28f5..e398e4b1e25 100644 --- a/services/brig/schema/src/V9.hs +++ b/services/brig/schema/src/V9.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API.hs b/services/brig/src/Brig/API.hs index 4e15d4e5022..9856f8520e5 100644 --- a/services/brig/src/Brig/API.hs +++ b/services/brig/src/Brig/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Client.hs b/services/brig/src/Brig/API/Client.hs index 1b0280aa608..a265fbc462e 100644 --- a/services/brig/src/Brig/API/Client.hs +++ b/services/brig/src/Brig/API/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Connection.hs b/services/brig/src/Brig/API/Connection.hs index d2e1a1d08f1..9495087c814 100644 --- a/services/brig/src/Brig/API/Connection.hs +++ b/services/brig/src/Brig/API/Connection.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,7 +14,6 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . --- TODO: Move to Brig.User.Connection (& split out Brig.User.Invitation?) -- | > docs/reference/user/connection.md {#RefConnection} -- diff --git a/services/brig/src/Brig/API/Connection/Remote.hs b/services/brig/src/Brig/API/Connection/Remote.hs index be1c64ecfe6..1e8190f203e 100644 --- a/services/brig/src/Brig/API/Connection/Remote.hs +++ b/services/brig/src/Brig/API/Connection/Remote.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Connection/Util.hs b/services/brig/src/Brig/API/Connection/Util.hs index 0f1f7b5b10e..b4730b0eaaa 100644 --- a/services/brig/src/Brig/API/Connection/Util.hs +++ b/services/brig/src/Brig/API/Connection/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Error.hs b/services/brig/src/Brig/API/Error.hs index 395b63257fc..58d92463152 100644 --- a/services/brig/src/Brig/API/Error.hs +++ b/services/brig/src/Brig/API/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Federation.hs b/services/brig/src/Brig/API/Federation.hs index 84c482c7b75..5375a174217 100644 --- a/services/brig/src/Brig/API/Federation.hs +++ b/services/brig/src/Brig/API/Federation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Handler.hs b/services/brig/src/Brig/API/Handler.hs index d8fa2c63c89..b88d1efdf80 100644 --- a/services/brig/src/Brig/API/Handler.hs +++ b/services/brig/src/Brig/API/Handler.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Internal.hs b/services/brig/src/Brig/API/Internal.hs index 9ad43d1bdb1..0f9e108ceb4 100644 --- a/services/brig/src/Brig/API/Internal.hs +++ b/services/brig/src/Brig/API/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Properties.hs b/services/brig/src/Brig/API/Properties.hs index ec8b928b2d1..d6c3e00cd18 100644 --- a/services/brig/src/Brig/API/Properties.hs +++ b/services/brig/src/Brig/API/Properties.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Public.hs b/services/brig/src/Brig/API/Public.hs index 0c8fb15456c..d35ad9c5e8e 100644 --- a/services/brig/src/Brig/API/Public.hs +++ b/services/brig/src/Brig/API/Public.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Types.hs b/services/brig/src/Brig/API/Types.hs index 83ceecba1a5..8d9359d29d4 100644 --- a/services/brig/src/Brig/API/Types.hs +++ b/services/brig/src/Brig/API/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/User.hs b/services/brig/src/Brig/API/User.hs index b70bc93f5d9..13e21692065 100644 --- a/services/brig/src/Brig/API/User.hs +++ b/services/brig/src/Brig/API/User.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/API/Util.hs b/services/brig/src/Brig/API/Util.hs index 05d22451cf4..3d4276d7f86 100644 --- a/services/brig/src/Brig/API/Util.hs +++ b/services/brig/src/Brig/API/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/AWS.hs b/services/brig/src/Brig/AWS.hs index 0e0e4aec5a3..2339a0114eb 100644 --- a/services/brig/src/Brig/AWS.hs +++ b/services/brig/src/Brig/AWS.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/AWS/SesNotification.hs b/services/brig/src/Brig/AWS/SesNotification.hs index 86e9327a0a7..1bcdccfc829 100644 --- a/services/brig/src/Brig/AWS/SesNotification.hs +++ b/services/brig/src/Brig/AWS/SesNotification.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/AWS/Types.hs b/services/brig/src/Brig/AWS/Types.hs index cc75390376a..e30b38d61de 100644 --- a/services/brig/src/Brig/AWS/Types.hs +++ b/services/brig/src/Brig/AWS/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/App.hs b/services/brig/src/Brig/App.hs index 326ca0b0a24..47637c7d6f0 100644 --- a/services/brig/src/Brig/App.hs +++ b/services/brig/src/Brig/App.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Budget.hs b/services/brig/src/Brig/Budget.hs index 38be47e7011..b7ac60fc888 100644 --- a/services/brig/src/Brig/Budget.hs +++ b/services/brig/src/Brig/Budget.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Calling.hs b/services/brig/src/Brig/Calling.hs index acd77634009..b69e1f34350 100644 --- a/services/brig/src/Brig/Calling.hs +++ b/services/brig/src/Brig/Calling.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Calling/API.hs b/services/brig/src/Brig/Calling/API.hs index b4ba4619956..08ef593b8a3 100644 --- a/services/brig/src/Brig/Calling/API.hs +++ b/services/brig/src/Brig/Calling/API.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -33,6 +33,7 @@ import qualified Brig.Calling as Calling import Brig.Calling.Internal import Brig.Effects.SFT import qualified Brig.Options as Opt +import Control.Error (hush) import Control.Lens import Data.ByteString.Conversion import Data.ByteString.Lens @@ -176,9 +177,9 @@ newConfig env sftStaticUrl mSftEnv limit version = do mSftServersAll :: Maybe [SFTServer] <- case version of CallsConfigDeprecated -> pure Nothing CallsConfigV2 -> - Just <$> case sftStaticUrl of - Nothing -> pure $ sftServerFromSrvTarget . srvTarget <$> maybe [] toList allSrvEntries - Just url -> fromRight [] . unSFTGetResponse <$> sftGetAllServers url + case sftStaticUrl of + Nothing -> pure . Just $ sftServerFromSrvTarget . srvTarget <$> maybe [] toList allSrvEntries + Just url -> hush . unSFTGetResponse <$> sftGetAllServers url let mSftServers = staticSft <|> sftServerFromSrvTarget . srvTarget <$$> srvEntries pure $ Public.rtcConfiguration srvs mSftServers cTTL mSftServersAll diff --git a/services/brig/src/Brig/Calling/Internal.hs b/services/brig/src/Brig/Calling/Internal.hs index 0ce1947b094..f297b678cee 100644 --- a/services/brig/src/Brig/Calling/Internal.hs +++ b/services/brig/src/Brig/Calling/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Code.hs b/services/brig/src/Brig/Code.hs index ff4ead2ebf2..52998da9593 100644 --- a/services/brig/src/Brig/Code.hs +++ b/services/brig/src/Brig/Code.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Activation.hs b/services/brig/src/Brig/Data/Activation.hs index 8cce76a40bc..1f3b394214c 100644 --- a/services/brig/src/Brig/Data/Activation.hs +++ b/services/brig/src/Brig/Data/Activation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Blacklist.hs b/services/brig/src/Brig/Data/Blacklist.hs index 89e571811ac..b99b866d8ef 100644 --- a/services/brig/src/Brig/Data/Blacklist.hs +++ b/services/brig/src/Brig/Data/Blacklist.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Client.hs b/services/brig/src/Brig/Data/Client.hs index 491479b2c89..b6178a0a8d5 100644 --- a/services/brig/src/Brig/Data/Client.hs +++ b/services/brig/src/Brig/Data/Client.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Connection.hs b/services/brig/src/Brig/Data/Connection.hs index 5c7ccf38d7a..949a458f57e 100644 --- a/services/brig/src/Brig/Data/Connection.hs +++ b/services/brig/src/Brig/Data/Connection.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Instances.hs b/services/brig/src/Brig/Data/Instances.hs index e6b7254b29d..b25d83d452c 100644 --- a/services/brig/src/Brig/Data/Instances.hs +++ b/services/brig/src/Brig/Data/Instances.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/LoginCode.hs b/services/brig/src/Brig/Data/LoginCode.hs index 5bd06b68a38..c4665d92324 100644 --- a/services/brig/src/Brig/Data/LoginCode.hs +++ b/services/brig/src/Brig/Data/LoginCode.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/PasswordReset.hs b/services/brig/src/Brig/Data/PasswordReset.hs index c486515d394..98295204b17 100644 --- a/services/brig/src/Brig/Data/PasswordReset.hs +++ b/services/brig/src/Brig/Data/PasswordReset.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Properties.hs b/services/brig/src/Brig/Data/Properties.hs index 18f49c7dd7e..822df183aa2 100644 --- a/services/brig/src/Brig/Data/Properties.hs +++ b/services/brig/src/Brig/Data/Properties.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/Types.hs b/services/brig/src/Brig/Data/Types.hs index d6013406ec5..3f117bea6dd 100644 --- a/services/brig/src/Brig/Data/Types.hs +++ b/services/brig/src/Brig/Data/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/User.hs b/services/brig/src/Brig/Data/User.hs index 56d8698266a..55e4c7fd00e 100644 --- a/services/brig/src/Brig/Data/User.hs +++ b/services/brig/src/Brig/Data/User.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/UserKey.hs b/services/brig/src/Brig/Data/UserKey.hs index 12ab1e27881..c8e08659216 100644 --- a/services/brig/src/Brig/Data/UserKey.hs +++ b/services/brig/src/Brig/Data/UserKey.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Data/UserPendingActivation.hs b/services/brig/src/Brig/Data/UserPendingActivation.hs index 44283515d20..4a11f83c1d6 100644 --- a/services/brig/src/Brig/Data/UserPendingActivation.hs +++ b/services/brig/src/Brig/Data/UserPendingActivation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Effects/SFT.hs b/services/brig/src/Brig/Effects/SFT.hs index 0abae5ab210..25a3fbc012f 100644 --- a/services/brig/src/Brig/Effects/SFT.hs +++ b/services/brig/src/Brig/Effects/SFT.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Brig.Effects.SFT ( SFTError (..), SFTGetResponse (..), @@ -32,9 +49,10 @@ import qualified Data.Map as Map import Data.Misc import Data.Schema import Data.String.Conversions (cs) -import Imports hiding (intercalate) +import Imports hiding (fromException, intercalate) import Network.HTTP.Client import Polysemy +import Polysemy.Error hiding (try) import Polysemy.Internal import Polysemy.TinyLog import qualified System.Logger as Log @@ -57,18 +75,22 @@ sftGetAllServers = send . SFTGetAllServers interpretSFT :: Members [Embed IO, TinyLog] r => Manager -> Sem (SFT ': r) a -> Sem r a interpretSFT httpManager = interpret $ \(SFTGetAllServers url) -> do let urlWithPath = ensureHttpsUrl $ (httpsUrl url) {uriPath = "/sft_servers_all.json"} - req = parseRequest_ . cs . toByteString' $ urlWithPath - responseURLsRaw <- liftIO (responseBody <$> httpLbs req httpManager) - let eList = Aeson.eitherDecode @AllURLs responseURLsRaw - res = bimap SFTError (fmap sftServer . unAllURLs) eList - void $ case res of - Left e -> - err $ - Log.field "sft_err" (show e) . Log.msg ("Error for URL: " <> toByteString' urlWithPath) - Right servers -> - info $ - Log.field "IPv4s" (show servers) . Log.msg ("Fetched the following server URLs" :: ByteString) - pure . SFTGetResponse $ res + fmap SFTGetResponse . runSftError urlWithPath $ do + let req = parseRequest_ . cs . toByteString' $ urlWithPath + response <- fromExceptionVia @HttpException (SFTError . show) (responseBody <$> httpLbs req httpManager) + let eList = Aeson.eitherDecode @AllURLs response + res <- fromEither $ bimap SFTError (fmap sftServer . unAllURLs) eList + debug $ Log.field "URLs" (show res) . Log.msg ("Fetched the following server URLs" :: ByteString) + pure res + +runSftError :: Members '[TinyLog] r => HttpsUrl -> Sem (Error SFTError : r) a -> Sem r (Either SFTError a) +runSftError urlWithPath act = + runError $ + act + `catch` ( \(e :: SFTError) -> do + err $ Log.field "sft_err" (show e) . Log.msg ("Error for URL: " <> toByteString' urlWithPath) + throw e + ) newtype AllURLs = AllURLs {unAllURLs :: [HttpsUrl]} deriving (Aeson.FromJSON) via Schema AllURLs diff --git a/services/brig/src/Brig/Email.hs b/services/brig/src/Brig/Email.hs index 1335ef784a2..fa6253c1eb6 100644 --- a/services/brig/src/Brig/Email.hs +++ b/services/brig/src/Brig/Email.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Federation/Client.hs b/services/brig/src/Brig/Federation/Client.hs index 57451d169c7..0e0a8cf91bd 100644 --- a/services/brig/src/Brig/Federation/Client.hs +++ b/services/brig/src/Brig/Federation/Client.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/IO/Intra.hs b/services/brig/src/Brig/IO/Intra.hs index a7ed7bc5068..5568bb9171a 100644 --- a/services/brig/src/Brig/IO/Intra.hs +++ b/services/brig/src/Brig/IO/Intra.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/IO/Journal.hs b/services/brig/src/Brig/IO/Journal.hs index fbb51f54167..3a2aaf1d37b 100644 --- a/services/brig/src/Brig/IO/Journal.hs +++ b/services/brig/src/Brig/IO/Journal.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Index/Eval.hs b/services/brig/src/Brig/Index/Eval.hs index b81f31de9c0..869ac464756 100644 --- a/services/brig/src/Brig/Index/Eval.hs +++ b/services/brig/src/Brig/Index/Eval.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Index/Migrations.hs b/services/brig/src/Brig/Index/Migrations.hs index 46295720fec..cf8089c6a33 100644 --- a/services/brig/src/Brig/Index/Migrations.hs +++ b/services/brig/src/Brig/Index/Migrations.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Index/Migrations/Types.hs b/services/brig/src/Brig/Index/Migrations/Types.hs index 3327515a134..6672e0785b9 100644 --- a/services/brig/src/Brig/Index/Migrations/Types.hs +++ b/services/brig/src/Brig/Index/Migrations/Types.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Index/Options.hs b/services/brig/src/Brig/Index/Options.hs index c60526a2eac..68a5b66e7f1 100644 --- a/services/brig/src/Brig/Index/Options.hs +++ b/services/brig/src/Brig/Index/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Index/Types.hs b/services/brig/src/Brig/Index/Types.hs index db400c1c19b..2393089fce9 100644 --- a/services/brig/src/Brig/Index/Types.hs +++ b/services/brig/src/Brig/Index/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/InternalEvent/Process.hs b/services/brig/src/Brig/InternalEvent/Process.hs index e4a02e8f3f3..c2b3b8109e6 100644 --- a/services/brig/src/Brig/InternalEvent/Process.hs +++ b/services/brig/src/Brig/InternalEvent/Process.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/InternalEvent/Types.hs b/services/brig/src/Brig/InternalEvent/Types.hs index c8cbb2b567f..b5cf86800d0 100644 --- a/services/brig/src/Brig/InternalEvent/Types.hs +++ b/services/brig/src/Brig/InternalEvent/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Locale.hs b/services/brig/src/Brig/Locale.hs index b1fa9e6b5b8..eaaf4ceb432 100644 --- a/services/brig/src/Brig/Locale.hs +++ b/services/brig/src/Brig/Locale.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Options.hs b/services/brig/src/Brig/Options.hs index 8487c2c4767..29b90c6dfe7 100644 --- a/services/brig/src/Brig/Options.hs +++ b/services/brig/src/Brig/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Password.hs b/services/brig/src/Brig/Password.hs index 0f7738e8375..d5889d1be7b 100644 --- a/services/brig/src/Brig/Password.hs +++ b/services/brig/src/Brig/Password.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Phone.hs b/services/brig/src/Brig/Phone.hs index 02379acb2ba..c3de7fe9508 100644 --- a/services/brig/src/Brig/Phone.hs +++ b/services/brig/src/Brig/Phone.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Provider/API.hs b/services/brig/src/Brig/Provider/API.hs index 3e705990009..27a45dbcf9a 100644 --- a/services/brig/src/Brig/Provider/API.hs +++ b/services/brig/src/Brig/Provider/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -816,7 +816,7 @@ addBot zuid zcon cid add = do throwStd tooManyMembers -- For team conversations: bots are not allowed in managed and in -- team-only conversations - when (cnvAccessRole cnv == TeamAccessRole) $ + unless (Set.member ServiceAccessRole (cnvAccessRoles cnv)) $ throwStd invalidConv for_ (cnvTeam cnv) $ \tid -> do tc <- lift (RPC.getTeamConv zuid tid cid) >>= maybeConvNotFound diff --git a/services/brig/src/Brig/Provider/DB.hs b/services/brig/src/Brig/Provider/DB.hs index 35118aa13cc..d2dc915989c 100644 --- a/services/brig/src/Brig/Provider/DB.hs +++ b/services/brig/src/Brig/Provider/DB.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Provider/Email.hs b/services/brig/src/Brig/Provider/Email.hs index 3b4e2f0fc66..f0b88831a8d 100644 --- a/services/brig/src/Brig/Provider/Email.hs +++ b/services/brig/src/Brig/Provider/Email.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Provider/RPC.hs b/services/brig/src/Brig/Provider/RPC.hs index faef52a3e19..03ce6c2f9a6 100644 --- a/services/brig/src/Brig/Provider/RPC.hs +++ b/services/brig/src/Brig/Provider/RPC.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Provider/Template.hs b/services/brig/src/Brig/Provider/Template.hs index b2c7828b7df..0ffbeaa8dd4 100644 --- a/services/brig/src/Brig/Provider/Template.hs +++ b/services/brig/src/Brig/Provider/Template.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Queue.hs b/services/brig/src/Brig/Queue.hs index 31bf303774d..9e03c45cf65 100644 --- a/services/brig/src/Brig/Queue.hs +++ b/services/brig/src/Brig/Queue.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Queue/Stomp.hs b/services/brig/src/Brig/Queue/Stomp.hs index 75d4462876d..6a8b93cc42e 100644 --- a/services/brig/src/Brig/Queue/Stomp.hs +++ b/services/brig/src/Brig/Queue/Stomp.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Queue/Types.hs b/services/brig/src/Brig/Queue/Types.hs index 8a20c3936ee..4f517ab7202 100644 --- a/services/brig/src/Brig/Queue/Types.hs +++ b/services/brig/src/Brig/Queue/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/RPC.hs b/services/brig/src/Brig/RPC.hs index 4d12ab84065..645abc530ed 100644 --- a/services/brig/src/Brig/RPC.hs +++ b/services/brig/src/Brig/RPC.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Run.hs b/services/brig/src/Brig/Run.hs index f4402dce559..579b5746b47 100644 --- a/services/brig/src/Brig/Run.hs +++ b/services/brig/src/Brig/Run.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/SMTP.hs b/services/brig/src/Brig/SMTP.hs index f176be2ddac..ed49d00c323 100644 --- a/services/brig/src/Brig/SMTP.hs +++ b/services/brig/src/Brig/SMTP.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Team/API.hs b/services/brig/src/Brig/Team/API.hs index f3a069dfc38..a55b9ffb59c 100644 --- a/services/brig/src/Brig/Team/API.hs +++ b/services/brig/src/Brig/Team/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Team/DB.hs b/services/brig/src/Brig/Team/DB.hs index 7216d751d44..920abedd76b 100644 --- a/services/brig/src/Brig/Team/DB.hs +++ b/services/brig/src/Brig/Team/DB.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Team/Email.hs b/services/brig/src/Brig/Team/Email.hs index 83759249f69..6b44547527a 100644 --- a/services/brig/src/Brig/Team/Email.hs +++ b/services/brig/src/Brig/Team/Email.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Team/Template.hs b/services/brig/src/Brig/Team/Template.hs index 1599d810a03..3c5596f9690 100644 --- a/services/brig/src/Brig/Team/Template.hs +++ b/services/brig/src/Brig/Team/Template.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Team/Util.hs b/services/brig/src/Brig/Team/Util.hs index 3593449b598..64279ec00c5 100644 --- a/services/brig/src/Brig/Team/Util.hs +++ b/services/brig/src/Brig/Team/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Template.hs b/services/brig/src/Brig/Template.hs index 91e6e732a7b..9e7f890eaac 100644 --- a/services/brig/src/Brig/Template.hs +++ b/services/brig/src/Brig/Template.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Unique.hs b/services/brig/src/Brig/Unique.hs index 5c0432d172c..c30884ca106 100644 --- a/services/brig/src/Brig/Unique.hs +++ b/services/brig/src/Brig/Unique.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/API/Auth.hs b/services/brig/src/Brig/User/API/Auth.hs index 3c21ab9c121..bd81bc54cf8 100644 --- a/services/brig/src/Brig/User/API/Auth.hs +++ b/services/brig/src/Brig/User/API/Auth.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/API/Handle.hs b/services/brig/src/Brig/User/API/Handle.hs index 4ef90c1bb37..7cf8ad8f0e1 100644 --- a/services/brig/src/Brig/User/API/Handle.hs +++ b/services/brig/src/Brig/User/API/Handle.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/API/Search.hs b/services/brig/src/Brig/User/API/Search.hs index b0c3a8f6c33..0b4b39add53 100644 --- a/services/brig/src/Brig/User/API/Search.hs +++ b/services/brig/src/Brig/User/API/Search.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Auth.hs b/services/brig/src/Brig/User/Auth.hs index adfe47babba..fc6868072cd 100644 --- a/services/brig/src/Brig/User/Auth.hs +++ b/services/brig/src/Brig/User/Auth.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Auth/Cookie.hs b/services/brig/src/Brig/User/Auth/Cookie.hs index 2d0b394a242..1bb09328eaf 100644 --- a/services/brig/src/Brig/User/Auth/Cookie.hs +++ b/services/brig/src/Brig/User/Auth/Cookie.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Auth/Cookie/Limit.hs b/services/brig/src/Brig/User/Auth/Cookie/Limit.hs index d8160d3f03b..e3b1ced23c0 100644 --- a/services/brig/src/Brig/User/Auth/Cookie/Limit.hs +++ b/services/brig/src/Brig/User/Auth/Cookie/Limit.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Auth/DB/Cookie.hs b/services/brig/src/Brig/User/Auth/DB/Cookie.hs index 7cdfcbdb964..aa668a37a94 100644 --- a/services/brig/src/Brig/User/Auth/DB/Cookie.hs +++ b/services/brig/src/Brig/User/Auth/DB/Cookie.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Auth/DB/Instances.hs b/services/brig/src/Brig/User/Auth/DB/Instances.hs index 971f8fd2488..9e4e60436bf 100644 --- a/services/brig/src/Brig/User/Auth/DB/Instances.hs +++ b/services/brig/src/Brig/User/Auth/DB/Instances.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/EJPD.hs b/services/brig/src/Brig/User/EJPD.hs index 7742b9dfe71..1a089b56da7 100644 --- a/services/brig/src/Brig/User/EJPD.hs +++ b/services/brig/src/Brig/User/EJPD.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Email.hs b/services/brig/src/Brig/User/Email.hs index 2fbc9c8b5a5..1a58f57285e 100644 --- a/services/brig/src/Brig/User/Email.hs +++ b/services/brig/src/Brig/User/Email.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Handle.hs b/services/brig/src/Brig/User/Handle.hs index 6827a41b27d..1f53d68492d 100644 --- a/services/brig/src/Brig/User/Handle.hs +++ b/services/brig/src/Brig/User/Handle.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Handle/Blacklist.hs b/services/brig/src/Brig/User/Handle/Blacklist.hs index e3e78a3e5a2..7a1dd67ea9a 100644 --- a/services/brig/src/Brig/User/Handle/Blacklist.hs +++ b/services/brig/src/Brig/User/Handle/Blacklist.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Phone.hs b/services/brig/src/Brig/User/Phone.hs index f7b355bdd18..31ab888f2ac 100644 --- a/services/brig/src/Brig/User/Phone.hs +++ b/services/brig/src/Brig/User/Phone.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Search/Index.hs b/services/brig/src/Brig/User/Search/Index.hs index 94de3110c12..85cc8fcf364 100644 --- a/services/brig/src/Brig/User/Search/Index.hs +++ b/services/brig/src/Brig/User/Search/Index.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Search/Index/Types.hs b/services/brig/src/Brig/User/Search/Index/Types.hs index ee0c01abf33..3356c03d190 100644 --- a/services/brig/src/Brig/User/Search/Index/Types.hs +++ b/services/brig/src/Brig/User/Search/Index/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Search/SearchIndex.hs b/services/brig/src/Brig/User/Search/SearchIndex.hs index 5ec9005a513..eab8d457486 100644 --- a/services/brig/src/Brig/User/Search/SearchIndex.hs +++ b/services/brig/src/Brig/User/Search/SearchIndex.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Search/TeamSize.hs b/services/brig/src/Brig/User/Search/TeamSize.hs index cb9c79b2331..b26d7286f0f 100644 --- a/services/brig/src/Brig/User/Search/TeamSize.hs +++ b/services/brig/src/Brig/User/Search/TeamSize.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Search/TeamUserSearch.hs b/services/brig/src/Brig/User/Search/TeamUserSearch.hs index 293db5ba4e1..7a4ba095f20 100644 --- a/services/brig/src/Brig/User/Search/TeamUserSearch.hs +++ b/services/brig/src/Brig/User/Search/TeamUserSearch.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/User/Template.hs b/services/brig/src/Brig/User/Template.hs index 9d44a2ad782..544e0bbf366 100644 --- a/services/brig/src/Brig/User/Template.hs +++ b/services/brig/src/Brig/User/Template.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/Whitelist.hs b/services/brig/src/Brig/Whitelist.hs index 010412c85b8..1e2beeb4da5 100644 --- a/services/brig/src/Brig/Whitelist.hs +++ b/services/brig/src/Brig/Whitelist.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Brig/ZAuth.hs b/services/brig/src/Brig/ZAuth.hs index f357959b8ba..5e8b585c739 100644 --- a/services/brig/src/Brig/ZAuth.hs +++ b/services/brig/src/Brig/ZAuth.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/src/Main.hs b/services/brig/src/Main.hs index 9741fc97521..dc0a8a7b0f1 100644 --- a/services/brig/src/Main.hs +++ b/services/brig/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Calling.hs b/services/brig/test/integration/API/Calling.hs index 758c1befc62..b4d1643e967 100644 --- a/services/brig/test/integration/API/Calling.hs +++ b/services/brig/test/integration/API/Calling.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -34,6 +34,7 @@ import Data.List1 (List1) import qualified Data.List1 as List1 import Data.Misc (Port (..), mkHttpsUrl) import qualified Data.Set as Set +import Data.String.Conversions import Imports import System.FilePath (()) import Test.Tasty @@ -56,7 +57,9 @@ tests m b opts turn turnV2 = do ], testGroup "sft" - [ test m "SFT servers /calls/config/v2 - 200" $ testSFT b opts + [ test m "SFT servers /calls/config/v2 - 200" $ testSFT b opts, + test m "SFT servers /calls/config/v2 - 200 - SFT does not respond as expected" $ testSFTUnavailble b opts "https://example.com", + test m "SFT servers /calls/config/v2 - 200 - SFT DNS does not resolve" $ testSFTUnavailble b opts "https://sft.example.com" ] ] @@ -107,6 +110,17 @@ testSFT b opts = do (Set.fromList [sftServer server1, sftServer server2]) (Set.fromList $ maybe [] NonEmpty.toList $ cfg1 ^. rtcConfSftServers) +testSFTUnavailble :: Brig -> Opts.Opts -> String -> Http () +testSFTUnavailble b opts domain = do + uid <- userId <$> randomUser b + withSettingsOverrides (opts {Opts.optSettings = (Opts.optSettings opts) {Opts.setSftStaticUrl = fromByteString (cs domain)}}) $ do + cfg <- getTurnConfigurationV2 uid b + liftIO $ do + assertEqual + "sft_servers_all should be missing" + Nothing + (cfg ^. rtcConfSftServersAll) + modifyAndAssert :: Brig -> UserId -> diff --git a/services/brig/test/integration/API/Federation.hs b/services/brig/test/integration/API/Federation.hs index 616ac1c61ec..da58718cc40 100644 --- a/services/brig/test/integration/API/Federation.hs +++ b/services/brig/test/integration/API/Federation.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Federation where import API.Search.Util (refreshIndex) diff --git a/services/brig/test/integration/API/Internal.hs b/services/brig/test/integration/API/Internal.hs index e0b380b313d..e1b472b5c2b 100644 --- a/services/brig/test/integration/API/Internal.hs +++ b/services/brig/test/integration/API/Internal.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Internal ( tests, ) diff --git a/services/brig/test/integration/API/Internal/Util.hs b/services/brig/test/integration/API/Internal/Util.hs index 4890231fa57..b526990ab67 100644 --- a/services/brig/test/integration/API/Internal/Util.hs +++ b/services/brig/test/integration/API/Internal/Util.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Internal.Util ( TestConstraints, MkUsr, diff --git a/services/brig/test/integration/API/Metrics.hs b/services/brig/test/integration/API/Metrics.hs index 461a25b2c07..666fc63a84f 100644 --- a/services/brig/test/integration/API/Metrics.hs +++ b/services/brig/test/integration/API/Metrics.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Provider.hs b/services/brig/test/integration/API/Provider.hs index d67ddf9476f..b97fc380499 100644 --- a/services/brig/test/integration/API/Provider.hs +++ b/services/brig/test/integration/API/Provider.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -594,24 +594,24 @@ testBotTeamOnlyConv config db brig galley cannon = withTestService config db bri qcid = Qualified cid localDomain -- Make the conversation team-only and check that the bot can't be added -- to the conversation - setAccessRole uid1 cid TeamAccessRole + setAccessRole uid1 cid (Set.fromList [TeamMemberAccessRole]) addBot brig uid1 pid sid cid !!! do const 403 === statusCode const (Just "invalid-conversation") === fmap Error.label . responseJsonMaybe -- Make the conversation allowed for guests and add the bot successfully - setAccessRole uid1 cid NonActivatedAccessRole + setAccessRole uid1 cid (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) bid <- addBotConv localDomain brig cannon uid1 uid2 cid pid sid buf let lbuid = qualifyAs luid1 . botUserId $ bid -- Make the conversation team-only again and check that the bot has been removed WS.bracketR cannon uid1 $ \ws -> do - setAccessRole uid1 cid TeamAccessRole + setAccessRole uid1 cid (Set.fromList [TeamMemberAccessRole]) _ <- waitFor (5 # Second) not (isMember galley lbuid cid) getBotConv galley bid cid !!! const 404 === statusCode svcAssertConvAccessUpdate buf (qUntagged luid1) - (ConversationAccessData (Set.singleton InviteAccess) TeamAccessRole) + (ConversationAccessData (Set.singleton InviteAccess) (Set.fromList [TeamMemberAccessRole])) qcid svcAssertMemberLeave buf (qUntagged lbuid) [qUntagged lbuid] qcid wsAssertMemberLeave ws qcid (qUntagged lbuid) [qUntagged lbuid] @@ -1322,7 +1322,7 @@ updateConversationAccess :: UserId -> ConvId -> [Access] -> - AccessRole -> + Set AccessRoleV2 -> Http ResponseLBS updateConversationAccess galley uid cid access role = put $ diff --git a/services/brig/test/integration/API/RichInfo/Util.hs b/services/brig/test/integration/API/RichInfo/Util.hs index 63a5643a9ac..29024f892f2 100644 --- a/services/brig/test/integration/API/RichInfo/Util.hs +++ b/services/brig/test/integration/API/RichInfo/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Search.hs b/services/brig/test/integration/API/Search.hs index 1cb3a2a5ba3..7e4796b0c1e 100644 --- a/services/brig/test/integration/API/Search.hs +++ b/services/brig/test/integration/API/Search.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Search/Util.hs b/services/brig/test/integration/API/Search/Util.hs index bb43ec32c2c..24e1d12305c 100644 --- a/services/brig/test/integration/API/Search/Util.hs +++ b/services/brig/test/integration/API/Search/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Settings.hs b/services/brig/test/integration/API/Settings.hs index 4c93cc73d77..639961890e1 100644 --- a/services/brig/test/integration/API/Settings.hs +++ b/services/brig/test/integration/API/Settings.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Team.hs b/services/brig/test/integration/API/Team.hs index d8e695b7831..654f274fc8c 100644 --- a/services/brig/test/integration/API/Team.hs +++ b/services/brig/test/integration/API/Team.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/Team/Util.hs b/services/brig/test/integration/API/Team/Util.hs index 36811ec25d3..d655f8c82c4 100644 --- a/services/brig/test/integration/API/Team/Util.hs +++ b/services/brig/test/integration/API/Team/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/TeamUserSearch.hs b/services/brig/test/integration/API/TeamUserSearch.hs index bd3ddbb9912..dc7f59af066 100644 --- a/services/brig/test/integration/API/TeamUserSearch.hs +++ b/services/brig/test/integration/API/TeamUserSearch.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User.hs b/services/brig/test/integration/API/User.hs index ed1863c4a59..296ca1157c7 100644 --- a/services/brig/test/integration/API/User.hs +++ b/services/brig/test/integration/API/User.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Account.hs b/services/brig/test/integration/API/User/Account.hs index 118e31f8ecf..77074404f81 100644 --- a/services/brig/test/integration/API/User/Account.hs +++ b/services/brig/test/integration/API/User/Account.hs @@ -17,6 +17,23 @@ -- with this program. If not, see . {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.User.Account ( tests, ) diff --git a/services/brig/test/integration/API/User/Auth.hs b/services/brig/test/integration/API/User/Auth.hs index f4ee97ea3f5..dc0691bb902 100644 --- a/services/brig/test/integration/API/User/Auth.hs +++ b/services/brig/test/integration/API/User/Auth.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Client.hs b/services/brig/test/integration/API/User/Client.hs index 0a2e1315695..bf14f69df98 100644 --- a/services/brig/test/integration/API/User/Client.hs +++ b/services/brig/test/integration/API/User/Client.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Connection.hs b/services/brig/test/integration/API/User/Connection.hs index 8ab59976bd7..0b73129ce81 100644 --- a/services/brig/test/integration/API/User/Connection.hs +++ b/services/brig/test/integration/API/User/Connection.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Handles.hs b/services/brig/test/integration/API/User/Handles.hs index 5ea8fce5b74..f9fa9728b12 100644 --- a/services/brig/test/integration/API/User/Handles.hs +++ b/services/brig/test/integration/API/User/Handles.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/PasswordReset.hs b/services/brig/test/integration/API/User/PasswordReset.hs index 7737a86c73b..a1da873e571 100644 --- a/services/brig/test/integration/API/User/PasswordReset.hs +++ b/services/brig/test/integration/API/User/PasswordReset.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Property.hs b/services/brig/test/integration/API/User/Property.hs index 45e5d84e18d..64f9152a05e 100644 --- a/services/brig/test/integration/API/User/Property.hs +++ b/services/brig/test/integration/API/User/Property.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/RichInfo.hs b/services/brig/test/integration/API/User/RichInfo.hs index b00993d2058..15978675848 100644 --- a/services/brig/test/integration/API/User/RichInfo.hs +++ b/services/brig/test/integration/API/User/RichInfo.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/User/Util.hs b/services/brig/test/integration/API/User/Util.hs index e626214cd22..0ef1900fd0a 100644 --- a/services/brig/test/integration/API/User/Util.hs +++ b/services/brig/test/integration/API/User/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/API/UserPendingActivation.hs b/services/brig/test/integration/API/UserPendingActivation.hs index 9b7411bb8f3..5dd0cfe45c8 100644 --- a/services/brig/test/integration/API/UserPendingActivation.hs +++ b/services/brig/test/integration/API/UserPendingActivation.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/Federation/End2end.hs b/services/brig/test/integration/Federation/End2end.hs index f430d6bca09..853bda1a63c 100644 --- a/services/brig/test/integration/Federation/End2end.hs +++ b/services/brig/test/integration/Federation/End2end.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/Federation/Util.hs b/services/brig/test/integration/Federation/Util.hs index 227cf207e99..9131cd1fa7d 100644 --- a/services/brig/test/integration/Federation/Util.hs +++ b/services/brig/test/integration/Federation/Util.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/Index/Create.hs b/services/brig/test/integration/Index/Create.hs index 2ac2403da59..3b3ec4111f1 100644 --- a/services/brig/test/integration/Index/Create.hs +++ b/services/brig/test/integration/Index/Create.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/Main.hs b/services/brig/test/integration/Main.hs index 29881f8efec..4d654ca0a16 100644 --- a/services/brig/test/integration/Main.hs +++ b/services/brig/test/integration/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/integration/Util.hs b/services/brig/test/integration/Util.hs index 86be8f98269..70fd87e91c0 100644 --- a/services/brig/test/integration/Util.hs +++ b/services/brig/test/integration/Util.hs @@ -19,6 +19,23 @@ {-# LANGUAGE NumericUnderscores #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Util where import Bilge diff --git a/services/brig/test/integration/Util/AWS.hs b/services/brig/test/integration/Util/AWS.hs index 7065c1bbf48..92a3d8e6874 100644 --- a/services/brig/test/integration/Util/AWS.hs +++ b/services/brig/test/integration/Util/AWS.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/unit/Main.hs b/services/brig/test/unit/Main.hs index ea675ebe300..dfb70f64485 100644 --- a/services/brig/test/unit/Main.hs +++ b/services/brig/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/unit/Test/Brig/Calling.hs b/services/brig/test/unit/Test/Brig/Calling.hs index 305ec4ec7ad..ba2e0152021 100644 --- a/services/brig/test/unit/Test/Brig/Calling.hs +++ b/services/brig/test/unit/Test/Brig/Calling.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -325,8 +325,8 @@ testSFTStaticV2StaticUrlError = do -- an error $ newConfig env (Just staticUrl) Nothing (Just . unsafeRange $ 2) CallsConfigV2 assertEqual - "when SFT static URL is enabled, but returns error, sft_servers_all should be empty" - (Just []) + "when SFT static URL is enabled, but returns error, sft_servers_all should be omitted" + Nothing (cfg ^. rtcConfSftServersAll) -- The v2 endpoint `GET /calls/config/v2` with an SFT static URL's /sft_servers_all.json diff --git a/services/brig/test/unit/Test/Brig/Calling/Internal.hs b/services/brig/test/unit/Test/Brig/Calling/Internal.hs index 5289db03eb7..1967f708268 100644 --- a/services/brig/test/unit/Test/Brig/Calling/Internal.hs +++ b/services/brig/test/unit/Test/Brig/Calling/Internal.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/unit/Test/Brig/Roundtrip.hs b/services/brig/test/unit/Test/Brig/Roundtrip.hs index 51a1f513c13..1938e46364e 100644 --- a/services/brig/test/unit/Test/Brig/Roundtrip.hs +++ b/services/brig/test/unit/Test/Brig/Roundtrip.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/brig/test/unit/Test/Brig/User/Search/Index/Types.hs b/services/brig/test/unit/Test/Brig/User/Search/Index/Types.hs index 12d144b548f..2dd532eb5b6 100644 --- a/services/brig/test/unit/Test/Brig/User/Search/Index/Types.hs +++ b/services/brig/test/unit/Test/Brig/User/Search/Index/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/bench/Bench.hs b/services/cannon/bench/Bench.hs index 69f6b2f7d5a..88bc123d4e6 100644 --- a/services/cannon/bench/Bench.hs +++ b/services/cannon/bench/Bench.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/bench/Main.hs b/services/cannon/bench/Main.hs index d019b98000f..2b05329e40b 100644 --- a/services/cannon/bench/Main.hs +++ b/services/cannon/bench/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/API/Internal.hs b/services/cannon/src/Cannon/API/Internal.hs index b60d6dcdff3..de3f20d495b 100644 --- a/services/cannon/src/Cannon/API/Internal.hs +++ b/services/cannon/src/Cannon/API/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/API/Public.hs b/services/cannon/src/Cannon/API/Public.hs index 8d4859ffca7..8e6fff49065 100644 --- a/services/cannon/src/Cannon/API/Public.hs +++ b/services/cannon/src/Cannon/API/Public.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/App.hs b/services/cannon/src/Cannon/App.hs index 70a3c966f3d..4435d779e4c 100644 --- a/services/cannon/src/Cannon/App.hs +++ b/services/cannon/src/Cannon/App.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/Dict.hs b/services/cannon/src/Cannon/Dict.hs index 3ba43b99ec3..6ba3edea140 100644 --- a/services/cannon/src/Cannon/Dict.hs +++ b/services/cannon/src/Cannon/Dict.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/Options.hs b/services/cannon/src/Cannon/Options.hs index 723bdaabafa..789c786327b 100644 --- a/services/cannon/src/Cannon/Options.hs +++ b/services/cannon/src/Cannon/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/Run.hs b/services/cannon/src/Cannon/Run.hs index 17296d01b9a..d4902460d39 100644 --- a/services/cannon/src/Cannon/Run.hs +++ b/services/cannon/src/Cannon/Run.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/Types.hs b/services/cannon/src/Cannon/Types.hs index 4aa6fba4b54..47962a83998 100644 --- a/services/cannon/src/Cannon/Types.hs +++ b/services/cannon/src/Cannon/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Cannon/WS.hs b/services/cannon/src/Cannon/WS.hs index 113f9ea14bc..76035acdc4b 100644 --- a/services/cannon/src/Cannon/WS.hs +++ b/services/cannon/src/Cannon/WS.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/src/Main.hs b/services/cannon/src/Main.hs index 0e5a8acef97..22180db501a 100644 --- a/services/cannon/src/Main.hs +++ b/services/cannon/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/test/Main.hs b/services/cannon/test/Main.hs index d6738f66c68..cd5591198ab 100644 --- a/services/cannon/test/Main.hs +++ b/services/cannon/test/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cannon/test/Test/Cannon/Dict.hs b/services/cannon/test/Test/Cannon/Dict.hs index 9303d8ba1ee..051daf847ca 100644 --- a/services/cannon/test/Test/Cannon/Dict.hs +++ b/services/cannon/test/Test/Cannon/Dict.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/Error.hs b/services/cargohold/src/CargoHold/API/Error.hs index 12d469439bf..e52f3b770cc 100644 --- a/services/cargohold/src/CargoHold/API/Error.hs +++ b/services/cargohold/src/CargoHold/API/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/Federation.hs b/services/cargohold/src/CargoHold/API/Federation.hs index 8a0efb0bb65..33b8f2f5852 100644 --- a/services/cargohold/src/CargoHold/API/Federation.hs +++ b/services/cargohold/src/CargoHold/API/Federation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/Legacy.hs b/services/cargohold/src/CargoHold/API/Legacy.hs index e5b05ac8aeb..a28da0d79c7 100644 --- a/services/cargohold/src/CargoHold/API/Legacy.hs +++ b/services/cargohold/src/CargoHold/API/Legacy.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/Public.hs b/services/cargohold/src/CargoHold/API/Public.hs index 0e2cd8295d0..b9c4514c9ec 100644 --- a/services/cargohold/src/CargoHold/API/Public.hs +++ b/services/cargohold/src/CargoHold/API/Public.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/Util.hs b/services/cargohold/src/CargoHold/API/Util.hs index 33c30e480ff..a6df369b1f4 100644 --- a/services/cargohold/src/CargoHold/API/Util.hs +++ b/services/cargohold/src/CargoHold/API/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/API/V3.hs b/services/cargohold/src/CargoHold/API/V3.hs index 1a1c3a0ccf7..dfd3f7305b1 100644 --- a/services/cargohold/src/CargoHold/API/V3.hs +++ b/services/cargohold/src/CargoHold/API/V3.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/AWS.hs b/services/cargohold/src/CargoHold/AWS.hs index a25b90e0c20..2051e788ace 100644 --- a/services/cargohold/src/CargoHold/AWS.hs +++ b/services/cargohold/src/CargoHold/AWS.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/App.hs b/services/cargohold/src/CargoHold/App.hs index 63f8d48543e..cc18bcf831f 100644 --- a/services/cargohold/src/CargoHold/App.hs +++ b/services/cargohold/src/CargoHold/App.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/CloudFront.hs b/services/cargohold/src/CargoHold/CloudFront.hs index d7ec53d2892..5ac34b0c5b0 100644 --- a/services/cargohold/src/CargoHold/CloudFront.hs +++ b/services/cargohold/src/CargoHold/CloudFront.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/Federation.hs b/services/cargohold/src/CargoHold/Federation.hs index abe73afe8e7..6949929ea87 100644 --- a/services/cargohold/src/CargoHold/Federation.hs +++ b/services/cargohold/src/CargoHold/Federation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/Metrics.hs b/services/cargohold/src/CargoHold/Metrics.hs index 3a0586dd301..aa21c396891 100644 --- a/services/cargohold/src/CargoHold/Metrics.hs +++ b/services/cargohold/src/CargoHold/Metrics.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/Options.hs b/services/cargohold/src/CargoHold/Options.hs index f46423b9104..450d994a78f 100644 --- a/services/cargohold/src/CargoHold/Options.hs +++ b/services/cargohold/src/CargoHold/Options.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/Run.hs b/services/cargohold/src/CargoHold/Run.hs index bd66227050d..7254b96efe4 100644 --- a/services/cargohold/src/CargoHold/Run.hs +++ b/services/cargohold/src/CargoHold/Run.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/S3.hs b/services/cargohold/src/CargoHold/S3.hs index 22fecb6dc67..10e4f006bb0 100644 --- a/services/cargohold/src/CargoHold/S3.hs +++ b/services/cargohold/src/CargoHold/S3.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/CargoHold/Util.hs b/services/cargohold/src/CargoHold/Util.hs index 22c2284fe01..cbc43db380d 100644 --- a/services/cargohold/src/CargoHold/Util.hs +++ b/services/cargohold/src/CargoHold/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/src/Main.hs b/services/cargohold/src/Main.hs index b0c1aecc4c7..83da6acc4fe 100644 --- a/services/cargohold/src/Main.hs +++ b/services/cargohold/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/API.hs b/services/cargohold/test/integration/API.hs index 2442e4fa047..85fbb126db5 100644 --- a/services/cargohold/test/integration/API.hs +++ b/services/cargohold/test/integration/API.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/API/Federation.hs b/services/cargohold/test/integration/API/Federation.hs index bb22a7d5822..f71a4ab8677 100644 --- a/services/cargohold/test/integration/API/Federation.hs +++ b/services/cargohold/test/integration/API/Federation.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Federation (tests) where import API.Util diff --git a/services/cargohold/test/integration/API/Util.hs b/services/cargohold/test/integration/API/Util.hs index e45140b3cb9..00eb0b7892c 100644 --- a/services/cargohold/test/integration/API/Util.hs +++ b/services/cargohold/test/integration/API/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/API/V3.hs b/services/cargohold/test/integration/API/V3.hs index d04b9d18ef8..4204510f32d 100644 --- a/services/cargohold/test/integration/API/V3.hs +++ b/services/cargohold/test/integration/API/V3.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/Main.hs b/services/cargohold/test/integration/Main.hs index 5c288ecf922..419786e39d3 100644 --- a/services/cargohold/test/integration/Main.hs +++ b/services/cargohold/test/integration/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/Metrics.hs b/services/cargohold/test/integration/Metrics.hs index d16e4dbc727..33ae1e92bd7 100644 --- a/services/cargohold/test/integration/Metrics.hs +++ b/services/cargohold/test/integration/Metrics.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/cargohold/test/integration/TestSetup.hs b/services/cargohold/test/integration/TestSetup.hs index 2f43e562a7e..571398743e8 100644 --- a/services/cargohold/test/integration/TestSetup.hs +++ b/services/cargohold/test/integration/TestSetup.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/exec/Main.hs b/services/federator/exec/Main.hs index eeedd91d7bd..bc35cda2439 100644 --- a/services/federator/exec/Main.hs +++ b/services/federator/exec/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/federator.cabal b/services/federator/federator.cabal index 97a98e21d42..26b06b23e4a 100644 --- a/services/federator/federator.cabal +++ b/services/federator/federator.cabal @@ -19,6 +19,7 @@ extra-source-files: test/resources/integration-leaf.pem test/resources/unit/example.com.pem test/resources/unit/gen-certs.sh + test/resources/unit/gen-multidomain-certs.sh test/resources/unit/invalid.pem test/resources/unit/localhost-dot-key.pem test/resources/unit/localhost-dot.pem @@ -28,6 +29,8 @@ extra-source-files: test/resources/unit/localhost.example.com-key.pem test/resources/unit/localhost.example.com.pem test/resources/unit/localhost.pem + test/resources/unit/multidomain-federator.example.com-key.pem + test/resources/unit/multidomain-federator.example.com.pem test/resources/unit/README.md test/resources/unit/second-federator.example.com-key.pem test/resources/unit/second-federator.example.com.pem diff --git a/services/federator/src/Federator/App.hs b/services/federator/src/Federator/App.hs index 2a33cd98600..bc3abfdaf35 100644 --- a/services/federator/src/Federator/App.hs +++ b/services/federator/src/Federator/App.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Discovery.hs b/services/federator/src/Federator/Discovery.hs index 4148e67c136..2ab59ec20bd 100644 --- a/services/federator/src/Federator/Discovery.hs +++ b/services/federator/src/Federator/Discovery.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Env.hs b/services/federator/src/Federator/Env.hs index ced29deb2bd..d337218c7ca 100644 --- a/services/federator/src/Federator/Env.hs +++ b/services/federator/src/Federator/Env.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Error.hs b/services/federator/src/Federator/Error.hs index 781c07bebfe..4e62a06ee1a 100644 --- a/services/federator/src/Federator/Error.hs +++ b/services/federator/src/Federator/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Error/ServerError.hs b/services/federator/src/Federator/Error/ServerError.hs index 798fe64272b..339eb86cc87 100644 --- a/services/federator/src/Federator/Error/ServerError.hs +++ b/services/federator/src/Federator/Error/ServerError.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/ExternalServer.hs b/services/federator/src/Federator/ExternalServer.hs index 092c1a31aff..68da960ac6c 100644 --- a/services/federator/src/Federator/ExternalServer.hs +++ b/services/federator/src/Federator/ExternalServer.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/InternalServer.hs b/services/federator/src/Federator/InternalServer.hs index c9aeace7b55..084907c6eb1 100644 --- a/services/federator/src/Federator/InternalServer.hs +++ b/services/federator/src/Federator/InternalServer.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/MockServer.hs b/services/federator/src/Federator/MockServer.hs index a501b0fb33c..b0f1133f54b 100644 --- a/services/federator/src/Federator/MockServer.hs +++ b/services/federator/src/Federator/MockServer.hs @@ -17,6 +17,23 @@ -- with this program. If not, see . {-# LANGUAGE RecordWildCards #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Federator.MockServer ( MockTimeout (..), MockException (..), diff --git a/services/federator/src/Federator/Monitor.hs b/services/federator/src/Federator/Monitor.hs index 9e3c5e07444..4015729da9f 100644 --- a/services/federator/src/Federator/Monitor.hs +++ b/services/federator/src/Federator/Monitor.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Monitor/Internal.hs b/services/federator/src/Federator/Monitor/Internal.hs index 9833077cdfe..771aa031b75 100644 --- a/services/federator/src/Federator/Monitor/Internal.hs +++ b/services/federator/src/Federator/Monitor/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Options.hs b/services/federator/src/Federator/Options.hs index 4904cc4e58f..803faa8d2a8 100644 --- a/services/federator/src/Federator/Options.hs +++ b/services/federator/src/Federator/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Remote.hs b/services/federator/src/Federator/Remote.hs index a206fcea360..9d0222617ae 100644 --- a/services/federator/src/Federator/Remote.hs +++ b/services/federator/src/Federator/Remote.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Response.hs b/services/federator/src/Federator/Response.hs index 76e2649a85f..cc28b977194 100644 --- a/services/federator/src/Federator/Response.hs +++ b/services/federator/src/Federator/Response.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Run.hs b/services/federator/src/Federator/Run.hs index a41b259451b..b07eecf20ac 100644 --- a/services/federator/src/Federator/Run.hs +++ b/services/federator/src/Federator/Run.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Service.hs b/services/federator/src/Federator/Service.hs index 9514f9ecf24..eff36408d1e 100644 --- a/services/federator/src/Federator/Service.hs +++ b/services/federator/src/Federator/Service.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/src/Federator/Validation.hs b/services/federator/src/Federator/Validation.hs index 6dc9e21ebd8..e9269ce3473 100644 --- a/services/federator/src/Federator/Validation.hs +++ b/services/federator/src/Federator/Validation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/integration/Main.hs b/services/federator/test/integration/Main.hs index 1c6432c981e..b0e144f9ac7 100644 --- a/services/federator/test/integration/Main.hs +++ b/services/federator/test/integration/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/integration/Test/Federator/IngressSpec.hs b/services/federator/test/integration/Test/Federator/IngressSpec.hs index f1b2b891bf3..c580be531ca 100644 --- a/services/federator/test/integration/Test/Federator/IngressSpec.hs +++ b/services/federator/test/integration/Test/Federator/IngressSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/integration/Test/Federator/InwardSpec.hs b/services/federator/test/integration/Test/Federator/InwardSpec.hs index c9213ed9011..4b2b8efc3f3 100644 --- a/services/federator/test/integration/Test/Federator/InwardSpec.hs +++ b/services/federator/test/integration/Test/Federator/InwardSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/integration/Test/Federator/JSON.hs b/services/federator/test/integration/Test/Federator/JSON.hs index 5e41236babe..d585fd3f9d9 100644 --- a/services/federator/test/integration/Test/Federator/JSON.hs +++ b/services/federator/test/integration/Test/Federator/JSON.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/integration/Test/Federator/Util.hs b/services/federator/test/integration/Test/Federator/Util.hs index 85bc5dff1c2..ac193d8a505 100644 --- a/services/federator/test/integration/Test/Federator/Util.hs +++ b/services/federator/test/integration/Test/Federator/Util.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/resources/unit/gen-multidomain-certs.sh b/services/federator/test/resources/unit/gen-multidomain-certs.sh new file mode 100755 index 00000000000..4e4abddd0a7 --- /dev/null +++ b/services/federator/test/resources/unit/gen-multidomain-certs.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Create a self-signed x509 certificate in script directory. +# Requires 'cfssl' to be on your PATH (see https://github.com/cloudflare/cfssl) +# These certificates are only meant for federator unit tests + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +set -ex +TEMP=${TEMP:-"$(mktemp -d)"} +REGENERATE=${REGENERATE:-0} +CSR="$TEMP/csr.json" +OUTPUTNAME_CA="$DIR/unit-ca" +OUTPUTNAME_MULTIDOMAIN_CERT="$DIR/multidomain-federator.example.com" + +command -v cfssl >/dev/null 2>&1 || { + echo >&2 "cfssl is not installed, aborting. See https://github.com/cloudflare/cfssl" + exit 1 +} +command -v cfssljson >/dev/null 2>&1 || { + echo >&2 "cfssljson is not installed, aborting. See https://github.com/cloudflare/cfssl" + exit 1 +} + +echo '{ + "CN": "ca.example.com", + "key": { + "algo": "rsa", + "size": 2048 + } +}' >"$CSR" + +# generate CA key and cert +if [[ ! -f "$OUTPUTNAME_CA.pem" ]] || [[ "$REGENERATE" -eq "1" ]]; then + cfssl gencert -initca "$CSR" | cfssljson -bare "$OUTPUTNAME_CA" +fi + +echo '{ + "key": { + "algo": "rsa", + "size": 2048 + }, + "hosts": [ + "something.example.com", + "somethingelse.example.com", + "federator.example.com", + "more.example.com" + ], + "CN": "webapp.example.com" +}' >"$CSR" + +generate_multi() { + local file=$1 + + if [[ ! -f "$file.pem" ]] || [[ "$REGENERATE" -eq "1" ]]; then + cfssl gencert -ca "$OUTPUTNAME_CA.pem" -ca-key "$OUTPUTNAME_CA-key.pem" "$CSR" | cfssljson -bare "$file" + fi +} + +# generate cert and key based on CA given comma-separated hostnames as SANs +generate_multi "$OUTPUTNAME_MULTIDOMAIN_CERT" + +# cleanup unneeded files +rm -f "$OUTPUTNAME_CA.csr" +rm -f "$OUTPUTNAME_MULTIDOMAIN_CERT.csr" diff --git a/services/federator/test/resources/unit/multidomain-federator.example.com-key.pem b/services/federator/test/resources/unit/multidomain-federator.example.com-key.pem new file mode 100644 index 00000000000..d5d7bf3e3c6 --- /dev/null +++ b/services/federator/test/resources/unit/multidomain-federator.example.com-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAy9HsavLl0QMaK/lmb4fa2RtDnvocPoHdNF/WWV0Ay6ZnS43z +tV+vVLv+CO3vegbdCLEFR3NXYRadwP2YTfVuj0mM4Z75T4iS+bvYMWIhkQoZ6SZc +7HccEiir1CnPvRKKRwbHtP0QHsGMK6YAC4dAb7r07p1Bt8nJgLza8Gm0poMyRA2Z +++lZaEnXCGuDJAz/uuo4SAWH7myhGJD4muu15N8rY0JBrGcjUONAUW18RmIJM9l+ +zHAhbP9Mt39iiT5bOwnnO/6BpdkLguVZrAoalIdHyz6RfVd8pNUZ1avs8yJwhwh7 +2vjdRek2nKrGOM04XbevnrmRE0AfulLYb6mFWwIDAQABAoH/OVLRK0MlX6N/uN5r +8PJEmssQOaYeS3Y6wIAzyO5fSueCJb3GzTwcE7jLubcxoyBLCia/VVkbOjMiKyUn +sMVWUvZcqRgNBlFjBNnP9BOlXSV6JBimCdt2CaVmrkUUKBkOyusdP8nsvrmwspX9 +bUCc3s+2E2YnFYmrIon7CaKxLCM5axdSeEB3nNGRhzJrjTK+ixP7N1xBqXqieh3e ++lxqOP1A9wY74blnX8jFOIVnnd8F2gE2FzM1EjVO/hgU+hS6ngudFaCxRwl0a0Xk +Uk2aZfmGeKw8fc1atrwjiaAIoE6JHazFkWTjzFCc8e8fD6VxdDqocBkxFWN/GVt4 +w/NBAoGBAO1AVcIEY6fXJFsM9vE9RVmvMAyRiUKQ2Iy3gtrN7RFWOfQQ7fl6oIwn +JFe/v9pIY10aMPPe7Vo/x5g6OIr7XNnx5cxoA5IAZ4lK66cZB/k2MM9vXe3X65Ql +fXrulzSTJC9uYQxqXcMXAwCAsHk5NWuejppO3iU8FUuLJ+iBIZb9AoGBANvtQ27c +l7IMkxAVLaSSzbUv6hVVRUG69pSJDOEFDwYJpxPtyOiHQgUJE7pUMoUOyp7dHacI +finEoQWNn3dNTTexDfNBWCxthD0KuJeSUJ7f1r3iSMosZVhwzXpgzyIl5MpCkoBa +rs7VSE4S69eupDqcxSEpnLz4qMQ6Wq9+zvk3AoGBAMyIYSZRSGSi2gnQxHc23jmy +CRdcxFtpqfauIhZl31HJ505c5fvk1tHc0L0BZvFU5KyX7snfTvo17+lxj9tpViPi +Ib01kpZk2N2IhF3a+3/CUxQRq4VnVwWxyFqZpCtECrcFTo84h7qvdPwS9ZCcXEx6 +NfAbu/GXubgVsIMGCCI1AoGBAKJm+5PDC7XsOTD4IqNT0NnKTxZ/yEu4j1uyNLN5 +s9VmjV1XCzRCpUrooAvJHyFIgfF8IOh2igu36pwaL7a+e5XzhfSqvTzZhnw5DYTI +BAa+DmpbzhqVXCVJ70I+eNajmuaM8Hgd/tY3g1Q7/rJfgWDS4XMSsm6NRLrayJqt +jpNTAoGABIX4UomE9hjkGr2H75IdR3zj/+s3qFhu8iapGVQNrBNmojUm6ZmlvTDq +jDDxBo4/2uu/n9z0CMIRnY4vPsZd9oQX1Vdi6zzPJ54iAMPCigB2Z6Ofy3PFYpya +0kjDeEh9fmYcSLfzMb+tUYz67NA5U0EwFyBXHIeojthnTB1VuGU= +-----END RSA PRIVATE KEY----- diff --git a/services/federator/test/resources/unit/multidomain-federator.example.com.pem b/services/federator/test/resources/unit/multidomain-federator.example.com.pem new file mode 100644 index 00000000000..0ff2d038f88 --- /dev/null +++ b/services/federator/test/resources/unit/multidomain-federator.example.com.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDqzCCApOgAwIBAgIUY6MD7XxDtLMCEmEotF9rALKki3kwDQYJKoZIhvcNAQEL +BQAwGTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5jb20wHhcNMjIwMTE3MTc1MTAwWhcN +MjMwMTE3MTc1MTAwWjAdMRswGQYDVQQDExJ3ZWJhcHAuZXhhbXBsZS5jb20wggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDL0exq8uXRAxor+WZvh9rZG0Oe ++hw+gd00X9ZZXQDLpmdLjfO1X69Uu/4I7e96Bt0IsQVHc1dhFp3A/ZhN9W6PSYzh +nvlPiJL5u9gxYiGRChnpJlzsdxwSKKvUKc+9EopHBse0/RAewYwrpgALh0BvuvTu +nUG3ycmAvNrwabSmgzJEDZn76VloSdcIa4MkDP+66jhIBYfubKEYkPia67Xk3ytj +QkGsZyNQ40BRbXxGYgkz2X7McCFs/0y3f2KJPls7Cec7/oGl2QuC5VmsChqUh0fL +PpF9V3yk1RnVq+zzInCHCHva+N1F6TacqsY4zThdt6+euZETQB+6UthvqYVbAgMB +AAGjgeYwgeMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr +BgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQFhMH6EpdP3e/LszqbACD+ +RWPaLzAfBgNVHSMEGDAWgBTPa43JEEcxHqTxapfEkE/gLxCDKTBkBgNVHREEXTBb +ghVzb21ldGhpbmcuZXhhbXBsZS5jb22CGXNvbWV0aGluZ2Vsc2UuZXhhbXBsZS5j +b22CFWZlZGVyYXRvci5leGFtcGxlLmNvbYIQbW9yZS5leGFtcGxlLmNvbTANBgkq +hkiG9w0BAQsFAAOCAQEA3sqGrbQ3FSt7n7jHRm0EIqpykqtiNeQn5hbSpM1lQ7JF +KHpVxVX6fzsqpwO1R4Rh658wciamUw+6j6zyo8uvE9QevBIm0tDusMttnqERFr3n +lVUhcOxdWqqADhQLEPkNsCGXFzkcEgIHV4OmYp5PS+U26In2zCT6e6XhXyvah3s/ +ITNFWJMd16XyA4XmCo8YA1odqTEBs0xOHSGp4CQVZdVTJiEQ8088zh99aK51MT/I +hNOPTrAEldmzvveGA0vpXg1c8zeeJN3Ldjotf6WxeHIsBljt7rLO/qmzMLCQnRDc +EruMu8+Sps6PndkRQbOJCqF5OKyOzJtaMSX/ONGvaw== +-----END CERTIFICATE----- diff --git a/services/federator/test/unit/Main.hs b/services/federator/test/unit/Main.hs index c3c54a42d1a..160cbbe28e5 100644 --- a/services/federator/test/unit/Main.hs +++ b/services/federator/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Client.hs b/services/federator/test/unit/Test/Federator/Client.hs index 3d70887271e..225a2dbd071 100644 --- a/services/federator/test/unit/Test/Federator/Client.hs +++ b/services/federator/test/unit/Test/Federator/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/ExternalServer.hs b/services/federator/test/unit/Test/Federator/ExternalServer.hs index a70934f8dac..5b561f73f07 100644 --- a/services/federator/test/unit/Test/Federator/ExternalServer.hs +++ b/services/federator/test/unit/Test/Federator/ExternalServer.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# OPTIONS_GHC -Wno-orphans #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Federator.ExternalServer where import qualified Data.ByteString as BS diff --git a/services/federator/test/unit/Test/Federator/InternalServer.hs b/services/federator/test/unit/Test/Federator/InternalServer.hs index 55452911f4b..f4560fd9f3b 100644 --- a/services/federator/test/unit/Test/Federator/InternalServer.hs +++ b/services/federator/test/unit/Test/Federator/InternalServer.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Monitor.hs b/services/federator/test/unit/Test/Federator/Monitor.hs index 4da257e55d2..f9fada1f68a 100644 --- a/services/federator/test/unit/Test/Federator/Monitor.hs +++ b/services/federator/test/unit/Test/Federator/Monitor.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Options.hs b/services/federator/test/unit/Test/Federator/Options.hs index 90345862734..b891fc6d810 100644 --- a/services/federator/test/unit/Test/Federator/Options.hs +++ b/services/federator/test/unit/Test/Federator/Options.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Remote.hs b/services/federator/test/unit/Test/Federator/Remote.hs index ce13842fb9c..842feba3602 100644 --- a/services/federator/test/unit/Test/Federator/Remote.hs +++ b/services/federator/test/unit/Test/Federator/Remote.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -120,6 +120,12 @@ testValidatesCertificateSuccess = Right _ -> assertFailure "Congratulations, you fixed a known issue!" ] +-- @SF.Federation @TSFI.RESTfulAPI @S2 +-- +-- This is a group of test cases where refusing to connect with the server is +-- checked. The second test case refuses to connect with a server when the +-- certificate's X509v3 Extended Key Usage extension is present and it does not +-- list "TLS Web Server Authentication" among the purposes. testValidatesCertificateWrongHostname :: TestTree testValidatesCertificateWrongHostname = testGroup @@ -142,6 +148,8 @@ testValidatesCertificateWrongHostname = Right _ -> assertFailure "Expected connection with the server to fail" ] +-- @END + testConnectionError :: TestTree testConnectionError = testCase "connection failures are reported correctly" $ do tlsSettings <- mkTLSSettingsOrThrow settings diff --git a/services/federator/test/unit/Test/Federator/Response.hs b/services/federator/test/unit/Test/Federator/Response.hs index b8addefb8de..4da3f1788b8 100644 --- a/services/federator/test/unit/Test/Federator/Response.hs +++ b/services/federator/test/unit/Test/Federator/Response.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Util.hs b/services/federator/test/unit/Test/Federator/Util.hs index ff8acc1be24..504a3525b63 100644 --- a/services/federator/test/unit/Test/Federator/Util.hs +++ b/services/federator/test/unit/Test/Federator/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/federator/test/unit/Test/Federator/Validation.hs b/services/federator/test/unit/Test/Federator/Validation.hs index 012ab593083..33ff845826c 100644 --- a/services/federator/test/unit/Test/Federator/Validation.hs +++ b/services/federator/test/unit/Test/Federator/Validation.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -76,6 +76,7 @@ tests = validateDomainCertInvalid, validateDomainCertWrongDomain, validateDomainCertCN, + validateDomainCertSAN, validateDomainMultipleFederators, validateDomainDiscoveryFailed, validateDomainNonIdentitySRV @@ -207,6 +208,20 @@ validateDomainCertCN = $ validateDomain (Just exampleCert) (toByteString' domain) res @?= domain +validateDomainCertSAN :: TestTree +validateDomainCertSAN = + testCase "should succeed if the certificate has a longer list of domains inside SAN, one of which is the expected one" $ do + exampleCert <- BS.readFile "test/resources/unit/multidomain-federator.example.com.pem" + let domain = Domain "federator.example.com" + res <- + runM + . assertNoError @ValidationError + . assertNoError @DiscoveryFailure + . mockDiscoveryTrivial + . runInputConst noClientCertSettings + $ validateDomain (Just exampleCert) (toByteString' domain) + res @?= domain + validateDomainMultipleFederators :: TestTree validateDomainMultipleFederators = testCase "should succedd if certificate matches any of the given federators" $ do diff --git a/services/galley/galley.cabal b/services/galley/galley.cabal index 94cca2e39b9..ee43a8f5a19 100644 --- a/services/galley/galley.cabal +++ b/services/galley/galley.cabal @@ -596,6 +596,7 @@ executable galley-schema V55_SelfDeletingMessagesLockStatus V56_GuestLinksTeamFeatureStatus V57_GuestLinksLockStatus + V58_ConversationAccessRoleV2 Paths_galley hs-source-dirs: schema/src diff --git a/services/galley/migrate-data/src/Galley/DataMigration.hs b/services/galley/migrate-data/src/Galley/DataMigration.hs index 4e5c7752632..14f1655eea3 100644 --- a/services/galley/migrate-data/src/Galley/DataMigration.hs +++ b/services/galley/migrate-data/src/Galley/DataMigration.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/migrate-data/src/Galley/DataMigration/Types.hs b/services/galley/migrate-data/src/Galley/DataMigration/Types.hs index 2cb4bcae4ac..3cc0f74cbbf 100644 --- a/services/galley/migrate-data/src/Galley/DataMigration/Types.hs +++ b/services/galley/migrate-data/src/Galley/DataMigration/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/migrate-data/src/Main.hs b/services/galley/migrate-data/src/Main.hs index 01b928c3244..08b6e51cfa3 100644 --- a/services/galley/migrate-data/src/Main.hs +++ b/services/galley/migrate-data/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/migrate-data/src/V1_BackfillBillingTeamMembers.hs b/services/galley/migrate-data/src/V1_BackfillBillingTeamMembers.hs index 09ee7cbfedd..fe6b29af559 100644 --- a/services/galley/migrate-data/src/V1_BackfillBillingTeamMembers.hs +++ b/services/galley/migrate-data/src/V1_BackfillBillingTeamMembers.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/Main.hs b/services/galley/schema/src/Main.hs index e67775ed7a6..4527efba15f 100644 --- a/services/galley/schema/src/Main.hs +++ b/services/galley/schema/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -60,6 +60,7 @@ import qualified V54_TeamFeatureSelfDeletingMessages import qualified V55_SelfDeletingMessagesLockStatus import qualified V56_GuestLinksTeamFeatureStatus import qualified V57_GuestLinksLockStatus +import qualified V58_ConversationAccessRoleV2 main :: IO () main = do @@ -105,7 +106,8 @@ main = do V54_TeamFeatureSelfDeletingMessages.migration, V55_SelfDeletingMessagesLockStatus.migration, V56_GuestLinksTeamFeatureStatus.migration, - V57_GuestLinksLockStatus.migration + V57_GuestLinksLockStatus.migration, + V58_ConversationAccessRoleV2.migration -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Cassandra -- (see also docs/developer/cassandra-interaction.md) diff --git a/services/galley/schema/src/V20.hs b/services/galley/schema/src/V20.hs index 0faad224bc4..a7a0432e58d 100644 --- a/services/galley/schema/src/V20.hs +++ b/services/galley/schema/src/V20.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V21.hs b/services/galley/schema/src/V21.hs index 2838bda9551..73c38cd9c58 100644 --- a/services/galley/schema/src/V21.hs +++ b/services/galley/schema/src/V21.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V22.hs b/services/galley/schema/src/V22.hs index 9eabee1a150..fcf8b5a7a7f 100644 --- a/services/galley/schema/src/V22.hs +++ b/services/galley/schema/src/V22.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V23.hs b/services/galley/schema/src/V23.hs index c607c6505e1..364f1e801de 100644 --- a/services/galley/schema/src/V23.hs +++ b/services/galley/schema/src/V23.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V24.hs b/services/galley/schema/src/V24.hs index 38bfa53391f..c07a7732b83 100644 --- a/services/galley/schema/src/V24.hs +++ b/services/galley/schema/src/V24.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V25.hs b/services/galley/schema/src/V25.hs index fc8ba690653..2dbec4d4268 100644 --- a/services/galley/schema/src/V25.hs +++ b/services/galley/schema/src/V25.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V26.hs b/services/galley/schema/src/V26.hs index 328306b4b2f..0e3e89b0ff4 100644 --- a/services/galley/schema/src/V26.hs +++ b/services/galley/schema/src/V26.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V27.hs b/services/galley/schema/src/V27.hs index d9f0996cb11..178c774cd94 100644 --- a/services/galley/schema/src/V27.hs +++ b/services/galley/schema/src/V27.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V28.hs b/services/galley/schema/src/V28.hs index faaa9234b7d..5e125e44d0a 100644 --- a/services/galley/schema/src/V28.hs +++ b/services/galley/schema/src/V28.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V29.hs b/services/galley/schema/src/V29.hs index 51d7bb17032..b3bbfebac3b 100644 --- a/services/galley/schema/src/V29.hs +++ b/services/galley/schema/src/V29.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V30.hs b/services/galley/schema/src/V30.hs index 9e8762694f9..b11c8d3ee24 100644 --- a/services/galley/schema/src/V30.hs +++ b/services/galley/schema/src/V30.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V31.hs b/services/galley/schema/src/V31.hs index da1c834a988..b41a320f609 100644 --- a/services/galley/schema/src/V31.hs +++ b/services/galley/schema/src/V31.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V32.hs b/services/galley/schema/src/V32.hs index 75b944b801d..9ecccedcde0 100644 --- a/services/galley/schema/src/V32.hs +++ b/services/galley/schema/src/V32.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V33.hs b/services/galley/schema/src/V33.hs index 323aac44fd9..9f97a7af4a0 100644 --- a/services/galley/schema/src/V33.hs +++ b/services/galley/schema/src/V33.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V34.hs b/services/galley/schema/src/V34.hs index e823bb26ac9..57d98b84773 100644 --- a/services/galley/schema/src/V34.hs +++ b/services/galley/schema/src/V34.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V35.hs b/services/galley/schema/src/V35.hs index b45095b2303..5b42b57fa2e 100644 --- a/services/galley/schema/src/V35.hs +++ b/services/galley/schema/src/V35.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V36.hs b/services/galley/schema/src/V36.hs index a5fbb375a04..82c9c046993 100644 --- a/services/galley/schema/src/V36.hs +++ b/services/galley/schema/src/V36.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V37.hs b/services/galley/schema/src/V37.hs index 3d8182bdbc9..214f1ef4e79 100644 --- a/services/galley/schema/src/V37.hs +++ b/services/galley/schema/src/V37.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V38_CreateTableBillingTeamMember.hs b/services/galley/schema/src/V38_CreateTableBillingTeamMember.hs index 08b1cc2fe25..eb03f182c34 100644 --- a/services/galley/schema/src/V38_CreateTableBillingTeamMember.hs +++ b/services/galley/schema/src/V38_CreateTableBillingTeamMember.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V39.hs b/services/galley/schema/src/V39.hs index 3d690bbb5a2..a0e6d85bb2c 100644 --- a/services/galley/schema/src/V39.hs +++ b/services/galley/schema/src/V39.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V40_CreateTableDataMigration.hs b/services/galley/schema/src/V40_CreateTableDataMigration.hs index 128be0f7766..7d3c0a1f6bc 100644 --- a/services/galley/schema/src/V40_CreateTableDataMigration.hs +++ b/services/galley/schema/src/V40_CreateTableDataMigration.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V41_TeamNotificationQueue.hs b/services/galley/schema/src/V41_TeamNotificationQueue.hs index e3ca37cfe11..cde9f8c0935 100644 --- a/services/galley/schema/src/V41_TeamNotificationQueue.hs +++ b/services/galley/schema/src/V41_TeamNotificationQueue.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V42_TeamFeatureValidateSamlEmails.hs b/services/galley/schema/src/V42_TeamFeatureValidateSamlEmails.hs index 76ff171d8d3..2232fdeffef 100644 --- a/services/galley/schema/src/V42_TeamFeatureValidateSamlEmails.hs +++ b/services/galley/schema/src/V42_TeamFeatureValidateSamlEmails.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V43_TeamFeatureDigitalSignatures.hs b/services/galley/schema/src/V43_TeamFeatureDigitalSignatures.hs index fb31e6efd0e..701396655aa 100644 --- a/services/galley/schema/src/V43_TeamFeatureDigitalSignatures.hs +++ b/services/galley/schema/src/V43_TeamFeatureDigitalSignatures.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V44_AddRemoteIdentifiers.hs b/services/galley/schema/src/V44_AddRemoteIdentifiers.hs index 0e6894cbb67..07eae794270 100644 --- a/services/galley/schema/src/V44_AddRemoteIdentifiers.hs +++ b/services/galley/schema/src/V44_AddRemoteIdentifiers.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V45_AddFederationIdMapping.hs b/services/galley/schema/src/V45_AddFederationIdMapping.hs index 210733d0f00..842aaae4144 100644 --- a/services/galley/schema/src/V45_AddFederationIdMapping.hs +++ b/services/galley/schema/src/V45_AddFederationIdMapping.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V46_TeamFeatureAppLock.hs b/services/galley/schema/src/V46_TeamFeatureAppLock.hs index 5ddd7542a96..b8ec3c03f81 100644 --- a/services/galley/schema/src/V46_TeamFeatureAppLock.hs +++ b/services/galley/schema/src/V46_TeamFeatureAppLock.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V47_RemoveFederationIdMapping.hs b/services/galley/schema/src/V47_RemoveFederationIdMapping.hs index c8599a8abda..4f8e0b5a9e0 100644 --- a/services/galley/schema/src/V47_RemoveFederationIdMapping.hs +++ b/services/galley/schema/src/V47_RemoveFederationIdMapping.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V48_DeleteRemoteIdentifiers.hs b/services/galley/schema/src/V48_DeleteRemoteIdentifiers.hs index 01268bafa81..3268147ffe8 100644 --- a/services/galley/schema/src/V48_DeleteRemoteIdentifiers.hs +++ b/services/galley/schema/src/V48_DeleteRemoteIdentifiers.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V49_ReAddRemoteIdentifiers.hs b/services/galley/schema/src/V49_ReAddRemoteIdentifiers.hs index ff171df8fc8..91748953c54 100644 --- a/services/galley/schema/src/V49_ReAddRemoteIdentifiers.hs +++ b/services/galley/schema/src/V49_ReAddRemoteIdentifiers.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V50_AddLegalholdWhitelisted.hs b/services/galley/schema/src/V50_AddLegalholdWhitelisted.hs index 4f38d31d69e..a7111849a06 100644 --- a/services/galley/schema/src/V50_AddLegalholdWhitelisted.hs +++ b/services/galley/schema/src/V50_AddLegalholdWhitelisted.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V51_FeatureFileSharing.hs b/services/galley/schema/src/V51_FeatureFileSharing.hs index 629c2fd2052..734ef96280a 100644 --- a/services/galley/schema/src/V51_FeatureFileSharing.hs +++ b/services/galley/schema/src/V51_FeatureFileSharing.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V52_FeatureConferenceCalling.hs b/services/galley/schema/src/V52_FeatureConferenceCalling.hs index bd8dcb2879b..78e4d9d5f1a 100644 --- a/services/galley/schema/src/V52_FeatureConferenceCalling.hs +++ b/services/galley/schema/src/V52_FeatureConferenceCalling.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V53_AddRemoteConvStatus.hs b/services/galley/schema/src/V53_AddRemoteConvStatus.hs index 0688e824936..2db8a204b00 100644 --- a/services/galley/schema/src/V53_AddRemoteConvStatus.hs +++ b/services/galley/schema/src/V53_AddRemoteConvStatus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V54_TeamFeatureSelfDeletingMessages.hs b/services/galley/schema/src/V54_TeamFeatureSelfDeletingMessages.hs index 35b2236e868..ab36ce3cb99 100644 --- a/services/galley/schema/src/V54_TeamFeatureSelfDeletingMessages.hs +++ b/services/galley/schema/src/V54_TeamFeatureSelfDeletingMessages.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V55_SelfDeletingMessagesLockStatus.hs b/services/galley/schema/src/V55_SelfDeletingMessagesLockStatus.hs index 58e61690693..888fde95d81 100644 --- a/services/galley/schema/src/V55_SelfDeletingMessagesLockStatus.hs +++ b/services/galley/schema/src/V55_SelfDeletingMessagesLockStatus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V56_GuestLinksTeamFeatureStatus.hs b/services/galley/schema/src/V56_GuestLinksTeamFeatureStatus.hs index e9ec3264628..d8b07ed2764 100644 --- a/services/galley/schema/src/V56_GuestLinksTeamFeatureStatus.hs +++ b/services/galley/schema/src/V56_GuestLinksTeamFeatureStatus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V57_GuestLinksLockStatus.hs b/services/galley/schema/src/V57_GuestLinksLockStatus.hs index 6afa380236e..f347e3de81e 100644 --- a/services/galley/schema/src/V57_GuestLinksLockStatus.hs +++ b/services/galley/schema/src/V57_GuestLinksLockStatus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRole_user.hs b/services/galley/schema/src/V58_ConversationAccessRoleV2.hs similarity index 57% rename from libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRole_user.hs rename to services/galley/schema/src/V58_ConversationAccessRoleV2.hs index c38f30d2964..0d1248f0705 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRole_user.hs +++ b/services/galley/schema/src/V58_ConversationAccessRoleV2.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2020 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,18 +14,20 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . -module Test.Wire.API.Golden.Generated.AccessRole_user where -import Wire.API.Conversation (AccessRole (..)) +module V58_ConversationAccessRoleV2 + ( migration, + ) +where -testObject_AccessRole_user_1 :: AccessRole -testObject_AccessRole_user_1 = PrivateAccessRole +import Cassandra.Schema +import Imports +import Text.RawString.QQ -testObject_AccessRole_user_2 :: AccessRole -testObject_AccessRole_user_2 = NonActivatedAccessRole - -testObject_AccessRole_user_3 :: AccessRole -testObject_AccessRole_user_3 = ActivatedAccessRole - -testObject_AccessRole_user_4 :: AccessRole -testObject_AccessRole_user_4 = TeamAccessRole +migration :: Migration +migration = Migration 58 "Add access_roles_v2 to conversation" $ do + schema' + [r| ALTER TABLE conversation ADD ( + access_roles_v2 set + ) + |] diff --git a/services/galley/src/Galley/API.hs b/services/galley/src/Galley/API.hs index f5d86ff5c88..bc6d83c4d6d 100644 --- a/services/galley/src/Galley/API.hs +++ b/services/galley/src/Galley/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Action.hs b/services/galley/src/Galley/API/Action.hs index 4275f105d86..49945f3d77e 100644 --- a/services/galley/src/Galley/API/Action.hs +++ b/services/galley/src/Galley/API/Action.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -185,10 +185,10 @@ instance IsConversationAction ConversationJoin where Map.fromList . map (view userId &&& id) <$> E.selectTeamMembers tid newUsers let userMembershipMap = map (id &&& flip Map.lookup tms) newUsers - ensureAccessRole (convAccessRole conv) userMembershipMap + ensureAccessRole (convAccessRoles conv) userMembershipMap ensureConnectedOrSameTeam lusr newUsers checkLocals lusr Nothing newUsers = do - ensureAccessRole (convAccessRole conv) (zip newUsers $ repeat Nothing) + ensureAccessRole (convAccessRoles conv) (zip newUsers $ repeat Nothing) ensureConnectedOrSameTeam lusr newUsers checkRemotes :: @@ -362,11 +362,8 @@ instance IsConversationAction ConversationAccessData where -- 'PrivateAccessRole' is for self-conversations, 1:1 conversations and -- so on; users are not supposed to be able to make other conversations -- have 'PrivateAccessRole' - when - ( PrivateAccess `elem` cupAccess target - || PrivateAccessRole == cupAccessRole target - ) - $ throw InvalidTargetAccess + when (PrivateAccess `elem` cupAccess target || Set.null (cupAccessRoles target)) $ + throw InvalidTargetAccess -- Team conversations incur another round of checks case convTeam conv of Just _ -> do @@ -374,8 +371,10 @@ instance IsConversationAction ConversationAccessData where -- conversation, so the user must have the necessary permission flag ensureActionAllowed RemoveConversationMember self Nothing -> - when (cupAccessRole target == TeamAccessRole) $ + -- not a team conv, so one of the other access roles has to allow this. + when (Set.null $ cupAccessRoles target Set.\\ Set.fromList [TeamMemberAccessRole]) $ throw InvalidTargetAccess + conversationActionTag' _ _ = ModifyConversationAccess performAction qusr lcnv conv action = do when (convAccessData conv == action) noChanges @@ -389,7 +388,8 @@ instance IsConversationAction ConversationAccessData where E.deleteCode key ReusableCode -- Determine bots and members to be removed - let filterBotsAndMembers = filterActivated >=> filterTeammates + let filterBotsAndMembers = + maybeRemoveBots >=> maybeRemoveGuests >=> maybeRemoveNonTeamMembers >=> maybeRemoveTeamMembers let current = convBotsAndMembers conv -- initial bots and members desired <- filterBotsAndMembers current -- desired bots and members let toRemove = bmDiff current desired -- bots and members to be removed @@ -401,38 +401,50 @@ instance IsConversationAction ConversationAccessData where traverse_ (E.deleteBot (tUnqualified lcnv) . botMemId) (bmBots toRemove) -- Update current bots and members - let current' = current {bmBots = bmBots desired} + -- current bots and members but only desired bots + let bmToNotify = current {bmBots = bmBots desired} -- Remove users and notify everyone void . for_ (nonEmpty (bmQualifiedMembers lcnv toRemove)) $ \usersToRemove -> do let rAction = ConversationLeave usersToRemove void . runError @NoChanges $ performAction qusr lcnv conv rAction - notifyConversationAction qusr Nothing lcnv current' (conversationAction rAction) + notifyConversationAction qusr Nothing lcnv bmToNotify (conversationAction rAction) pure (mempty, action) where - filterActivated :: Member BrigAccess r => BotsAndMembers -> Sem r BotsAndMembers - filterActivated bm - | convAccessRole conv > ActivatedAccessRole - && cupAccessRole action <= ActivatedAccessRole = do - activated <- map User.userId <$> E.lookupActivatedUsers (toList (bmLocals bm)) - -- FUTUREWORK: should we also remove non-activated remote users? - pure $ bm {bmLocals = Set.fromList activated} - | otherwise = pure bm - - filterTeammates :: Member TeamStore r => BotsAndMembers -> Sem r BotsAndMembers - filterTeammates bm = do - -- In a team-only conversation we also want to remove bots and guests - case (cupAccessRole action, convTeam conv) of - (TeamAccessRole, Just tid) -> do - onlyTeamUsers <- flip filterM (toList (bmLocals bm)) $ \user -> - isJust <$> E.getTeamMember tid user - pure $ - BotsAndMembers - { bmLocals = Set.fromList onlyTeamUsers, - bmBots = mempty, - bmRemotes = mempty - } - _ -> pure bm + maybeRemoveBots :: Member BrigAccess r => BotsAndMembers -> Sem r BotsAndMembers + maybeRemoveBots bm = + if Set.member ServiceAccessRole (cupAccessRoles action) + then pure bm + else pure $ bm {bmBots = mempty} + + maybeRemoveGuests :: Member BrigAccess r => BotsAndMembers -> Sem r BotsAndMembers + maybeRemoveGuests bm = + if Set.member GuestAccessRole (cupAccessRoles action) + then pure bm + else do + activated <- map User.userId <$> E.lookupActivatedUsers (toList (bmLocals bm)) + -- FUTUREWORK: should we also remove non-activated remote users? + pure $ bm {bmLocals = Set.fromList activated} + + maybeRemoveNonTeamMembers :: Member TeamStore r => BotsAndMembers -> Sem r BotsAndMembers + maybeRemoveNonTeamMembers bm = + if Set.member NonTeamMemberAccessRole (cupAccessRoles action) + then pure bm + else case convTeam conv of + Just tid -> do + onlyTeamUsers <- filterM (fmap isJust . E.getTeamMember tid) (toList (bmLocals bm)) + pure $ bm {bmLocals = Set.fromList onlyTeamUsers, bmRemotes = mempty} + Nothing -> pure bm + + maybeRemoveTeamMembers :: Member TeamStore r => BotsAndMembers -> Sem r BotsAndMembers + maybeRemoveTeamMembers bm = + if Set.member TeamMemberAccessRole (cupAccessRoles action) + then pure bm + else case convTeam conv of + Just tid -> do + noTeamMembers <- filterM (fmap isNothing . E.getTeamMember tid) (toList (bmLocals bm)) + pure $ bm {bmLocals = Set.fromList noTeamMembers} + Nothing -> pure bm -- | Update a local conversation, and notify all local and remote members. updateLocalConversation :: diff --git a/services/galley/src/Galley/API/Clients.hs b/services/galley/src/Galley/API/Clients.hs index ec2ede0a808..70316144196 100644 --- a/services/galley/src/Galley/API/Clients.hs +++ b/services/galley/src/Galley/API/Clients.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Create.hs b/services/galley/src/Galley/API/Create.hs index 89b2ba348b6..1e1ffd12b91 100644 --- a/services/galley/src/Galley/API/Create.hs +++ b/services/galley/src/Galley/API/Create.hs @@ -1,11 +1,19 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free -- Software Foundation, either version 3 of the License, or (at your option) any -- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . -- This program is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS @@ -205,7 +213,7 @@ createRegularGroupConv lusr zcon (NewConvUnmanaged body) = do { ncType = RegularConv, ncCreator = tUnqualified lusr, ncAccess = access body, - ncAccessRole = accessRole body, + ncAccessRoles = accessRoles body, ncName = name, ncTeam = fmap cnvTeamId (newConvTeam body), ncMessageTimer = newConvMessageTimer body, @@ -252,7 +260,7 @@ createTeamGroupConv lusr zcon tinfo body = do o <- input checkedUsers <- checkedConvSize o allUsers convLocalMemberships <- mapM (E.getTeamMember convTeam) (ulLocals allUsers) - ensureAccessRole (accessRole body) (zip (ulLocals allUsers) convLocalMemberships) + ensureAccessRole (accessRoles body) (zip (ulLocals allUsers) convLocalMemberships) -- In teams we don't have 1:1 conversations, only regular conversations. We want -- users without the 'AddRemoveConvMember' permission to still be able to create -- regular conversations, therefore we check for 'AddRemoveConvMember' only if @@ -276,7 +284,7 @@ createTeamGroupConv lusr zcon tinfo body = do { ncType = RegularConv, ncCreator = tUnqualified lusr, ncAccess = access body, - ncAccessRole = accessRole body, + ncAccessRoles = accessRoles body, ncName = name, ncTeam = fmap cnvTeamId (newConvTeam body), ncMessageTimer = newConvMessageTimer body, @@ -647,8 +655,8 @@ toUUIDs a b = do b' <- U.fromUUID (toUUID b) & note InvalidUUID4 return (a', b') -accessRole :: NewConv -> AccessRole -accessRole b = fromMaybe Data.defRole (newConvAccessRole b) +accessRoles :: NewConv -> Set AccessRoleV2 +accessRoles b = fromMaybe Data.defRole (newConvAccessRoles b) access :: NewConv -> [Access] access a = case Set.toList (newConvAccess a) of diff --git a/services/galley/src/Galley/API/CustomBackend.hs b/services/galley/src/Galley/API/CustomBackend.hs index d65c6effe62..3a47438ec09 100644 --- a/services/galley/src/Galley/API/CustomBackend.hs +++ b/services/galley/src/Galley/API/CustomBackend.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Error.hs b/services/galley/src/Galley/API/Error.hs index 2e5a8a9afd5..d6eb0aa94b1 100644 --- a/services/galley/src/Galley/API/Error.hs +++ b/services/galley/src/Galley/API/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Federation.hs b/services/galley/src/Galley/API/Federation.hs index 87a36835cea..496bb26cfe4 100644 --- a/services/galley/src/Galley/API/Federation.hs +++ b/services/galley/src/Galley/API/Federation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Galley.API.Federation where import Brig.Types.Connection (Relation (Accepted)) diff --git a/services/galley/src/Galley/API/Internal.hs b/services/galley/src/Galley/API/Internal.hs index 34fca3d53c3..657d8c153cc 100644 --- a/services/galley/src/Galley/API/Internal.hs +++ b/services/galley/src/Galley/API/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/LegalHold.hs b/services/galley/src/Galley/API/LegalHold.hs index a8f3cc7cb4c..ed88f1cb34b 100644 --- a/services/galley/src/Galley/API/LegalHold.hs +++ b/services/galley/src/Galley/API/LegalHold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/LegalHold/Conflicts.hs b/services/galley/src/Galley/API/LegalHold/Conflicts.hs index e70937ccd72..dfbd525361f 100644 --- a/services/galley/src/Galley/API/LegalHold/Conflicts.hs +++ b/services/galley/src/Galley/API/LegalHold/Conflicts.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Mapping.hs b/services/galley/src/Galley/API/Mapping.hs index e972a092041..45cc062b80b 100644 --- a/services/galley/src/Galley/API/Mapping.hs +++ b/services/galley/src/Galley/API/Mapping.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Message.hs b/services/galley/src/Galley/API/Message.hs index d17247040d7..4de70882086 100644 --- a/services/galley/src/Galley/API/Message.hs +++ b/services/galley/src/Galley/API/Message.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Galley.API.Message where import Control.Lens diff --git a/services/galley/src/Galley/API/One2One.hs b/services/galley/src/Galley/API/One2One.hs index 348da8c1d05..e0ea6df3721 100644 --- a/services/galley/src/Galley/API/One2One.hs +++ b/services/galley/src/Galley/API/One2One.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# LANGUAGE RecordWildCards #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Galley.API.One2One ( one2OneConvId, iUpsertOne2OneConversation, diff --git a/services/galley/src/Galley/API/Public.hs b/services/galley/src/Galley/API/Public.hs index d298dc30641..6b6a4c84be9 100644 --- a/services/galley/src/Galley/API/Public.hs +++ b/services/galley/src/Galley/API/Public.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Galley.API.Public ( sitemap, apiDocs, diff --git a/services/galley/src/Galley/API/Query.hs b/services/galley/src/Galley/API/Query.hs index 451726ef0ad..d93eb382c45 100644 --- a/services/galley/src/Galley/API/Query.hs +++ b/services/galley/src/Galley/API/Query.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# LANGUAGE RecordWildCards #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Galley.API.Query ( getBotConversationH, getUnqualifiedConversation, diff --git a/services/galley/src/Galley/API/Teams.hs b/services/galley/src/Galley/API/Teams.hs index a9e332d6e16..4cffae12827 100644 --- a/services/galley/src/Galley/API/Teams.hs +++ b/services/galley/src/Galley/API/Teams.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Teams/Features.hs b/services/galley/src/Galley/API/Teams/Features.hs index 4593501051f..8bfc7574218 100644 --- a/services/galley/src/Galley/API/Teams/Features.hs +++ b/services/galley/src/Galley/API/Teams/Features.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Teams/Notifications.hs b/services/galley/src/Galley/API/Teams/Notifications.hs index c84918ccd53..b0e48d19c5c 100644 --- a/services/galley/src/Galley/API/Teams/Notifications.hs +++ b/services/galley/src/Galley/API/Teams/Notifications.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Update.hs b/services/galley/src/Galley/API/Update.hs index 2969c49d438..4ab5392bbad 100644 --- a/services/galley/src/Galley/API/Update.hs +++ b/services/galley/src/Galley/API/Update.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Util.hs b/services/galley/src/Galley/API/Util.hs index cdc1bdbed69..bbd5611ac1f 100644 --- a/services/galley/src/Galley/API/Util.hs +++ b/services/galley/src/Galley/API/Util.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -69,24 +69,25 @@ import Wire.API.ErrorDescription import Wire.API.Federation.API import Wire.API.Federation.API.Galley import Wire.API.Federation.Error +import qualified Wire.API.User as User type JSON = Media "application" "json" ensureAccessRole :: Members '[BrigAccess, Error NotATeamMember, Error ConversationError] r => - AccessRole -> + Set Public.AccessRoleV2 -> [(UserId, Maybe TeamMember)] -> Sem r () -ensureAccessRole role users = case role of - PrivateAccessRole -> throw ConvAccessDenied - TeamAccessRole -> - when (any (isNothing . snd) users) $ - throwED @NotATeamMember - ActivatedAccessRole -> do - activated <- lookupActivatedUsers $ map fst users - when (length activated /= length users) $ - throw ConvAccessDenied - NonActivatedAccessRole -> return () +ensureAccessRole roles users = do + when (Set.null roles) $ throw ConvAccessDenied + unless (NonTeamMemberAccessRole `Set.member` roles) $ + when (any (isNothing . snd) users) $ throwED @NotATeamMember + unless (Set.fromList [GuestAccessRole, ServiceAccessRole] `Set.isSubsetOf` roles) $ do + activated <- lookupActivatedUsers (fst <$> users) + let guestsExist = length activated /= length users + unless (not guestsExist || GuestAccessRole `Set.member` roles) $ throw ConvAccessDenied + let botsExist = any (isJust . User.userService) activated + unless (not botsExist || ServiceAccessRole `Set.member` roles) $ throw ConvAccessDenied -- | Check that the given user is either part of the same team(s) as the other -- users OR that there is a connection. @@ -595,7 +596,7 @@ ensureConversationAccess zusr cnv access = do ensureAccess conv access zusrMembership <- maybe (pure Nothing) (`getTeamMember` zusr) (Data.convTeam conv) - ensureAccessRole (Data.convAccessRole conv) [(zusr, zusrMembership)] + ensureAccessRole (Data.convAccessRoles conv) [(zusr, zusrMembership)] pure conv ensureAccess :: @@ -645,7 +646,7 @@ toNewRemoteConversation now localDomain Data.Conversation {..} = rcCnvId = convId, rcCnvType = convType, rcCnvAccess = convAccess, - rcCnvAccessRole = convAccessRole, + rcCnvAccessRoles = convAccessRoles, rcCnvName = convName, rcNonCreatorMembers = toMembers (filter (\lm -> lmId lm /= convCreator) convLocalMembers) convRemoteMembers, rcMessageTimer = convMessageTimer, @@ -712,7 +713,7 @@ fromNewRemoteConversation loc rc@NewRemoteConversation {..} = -- domain cnvmCreator = rcOrigUserId, cnvmAccess = rcCnvAccess, - cnvmAccessRole = rcCnvAccessRole, + cnvmAccessRoles = rcCnvAccessRoles, cnvmName = rcCnvName, -- FUTUREWORK: Document this is the same domain as the conversation -- domain. diff --git a/services/galley/src/Galley/App.hs b/services/galley/src/Galley/App.hs index e3a80a6bef7..5cdcabeb1f3 100644 --- a/services/galley/src/Galley/App.hs +++ b/services/galley/src/Galley/App.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Aws.hs b/services/galley/src/Galley/Aws.hs index 9121ab43751..aa7447f1061 100644 --- a/services/galley/src/Galley/Aws.hs +++ b/services/galley/src/Galley/Aws.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra.hs b/services/galley/src/Galley/Cassandra.hs index 2840865d44c..3900d25ed94 100644 --- a/services/galley/src/Galley/Cassandra.hs +++ b/services/galley/src/Galley/Cassandra.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -20,4 +20,4 @@ module Galley.Cassandra (schemaVersion) where import Imports schemaVersion :: Int32 -schemaVersion = 57 +schemaVersion = 58 diff --git a/services/galley/src/Galley/Cassandra/Access.hs b/services/galley/src/Galley/Cassandra/Access.hs index a2c4fb176b7..05c566bfd11 100644 --- a/services/galley/src/Galley/Cassandra/Access.hs +++ b/services/galley/src/Galley/Cassandra/Access.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Client.hs b/services/galley/src/Galley/Cassandra/Client.hs index f5432f2a927..25fb2a44d22 100644 --- a/services/galley/src/Galley/Cassandra/Client.hs +++ b/services/galley/src/Galley/Cassandra/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Code.hs b/services/galley/src/Galley/Cassandra/Code.hs index b2d41aaf028..4a63ad0742a 100644 --- a/services/galley/src/Galley/Cassandra/Code.hs +++ b/services/galley/src/Galley/Cassandra/Code.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Conversation.hs b/services/galley/src/Galley/Cassandra/Conversation.hs index bf394171954..27c61631877 100644 --- a/services/galley/src/Galley/Cassandra/Conversation.hs +++ b/services/galley/src/Galley/Cassandra/Conversation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -30,6 +30,7 @@ import qualified Data.Map as Map import Data.Misc import Data.Qualified import Data.Range +import qualified Data.Set as Set import qualified Data.UUID.Tagged as U import Data.UUID.V4 (nextRandom) import Galley.Cassandra.Access @@ -56,11 +57,11 @@ createConversation (NewConversation ty usr acc arole name mtid mtimer recpt user conv <- Id <$> liftIO nextRandom retry x5 $ case mtid of Nothing -> - write Cql.insertConv (params LocalQuorum (conv, ty, usr, Cql.Set (toList acc), arole, fmap fromRange name, Nothing, mtimer, recpt)) + write Cql.insertConv (params LocalQuorum (conv, ty, usr, Cql.Set (toList acc), Cql.Set (toList arole), fmap fromRange name, Nothing, mtimer, recpt)) Just tid -> batch $ do setType BatchLogged setConsistency LocalQuorum - addPrepQuery Cql.insertConv (conv, ty, usr, Cql.Set (toList acc), arole, fmap fromRange name, Just tid, mtimer, recpt) + addPrepQuery Cql.insertConv (conv, ty, usr, Cql.Set (toList acc), Cql.Set (toList arole), fmap fromRange name, Just tid, mtimer, recpt) addPrepQuery Cql.insertTeamConv (tid, conv, False) let newUsers = fmap (,role) (fromConvSize users) (lmems, rmems) <- addMembers conv (ulAddLocal (usr, roleNameWireAdmin) newUsers) @@ -71,7 +72,7 @@ createConversation (NewConversation ty usr acc arole name mtid mtimer recpt user convCreator = usr, convName = fmap fromRange name, convAccess = acc, - convAccessRole = arole, + convAccessRoles = arole, convLocalMembers = lmems, convRemoteMembers = rmems, convTeam = mtid, @@ -89,7 +90,7 @@ createConnectConversation a b name = do let conv = localOne2OneConvId a b a' = Id . U.unpack $ a retry x5 $ - write Cql.insertConv (params LocalQuorum (conv, ConnectConv, a', privateOnly, privateRole, fromRange <$> name, Nothing, Nothing, Nothing)) + write Cql.insertConv (params LocalQuorum (conv, ConnectConv, a', privateOnly, Cql.Set [], fromRange <$> name, Nothing, Nothing, Nothing)) -- We add only one member, second one gets added later, -- when the other user accepts the connection request. (lmems, rmems) <- addMembers conv (UserList [a'] []) @@ -100,7 +101,7 @@ createConnectConversation a b name = do convCreator = a', convName = fmap fromRange name, convAccess = [PrivateAccess], - convAccessRole = privateRole, + convAccessRoles = Set.empty, convLocalMembers = lmems, convRemoteMembers = rmems, convTeam = Nothing, @@ -116,7 +117,7 @@ createConnectConversationWithRemote :: Client Conversation createConnectConversationWithRemote cid creator m = do retry x5 $ - write Cql.insertConv (params LocalQuorum (cid, ConnectConv, creator, privateOnly, privateRole, Nothing, Nothing, Nothing, Nothing)) + write Cql.insertConv (params LocalQuorum (cid, ConnectConv, creator, privateOnly, Cql.Set [], Nothing, Nothing, Nothing, Nothing)) -- We add only one member, second one gets added later, -- when the other user accepts the connection request. (lmems, rmems) <- addMembers cid m @@ -127,7 +128,7 @@ createConnectConversationWithRemote cid creator m = do convCreator = creator, convName = Nothing, convAccess = [PrivateAccess], - convAccessRole = privateRole, + convAccessRoles = Set.empty, convLocalMembers = lmems, convRemoteMembers = rmems, convTeam = Nothing, @@ -163,11 +164,11 @@ createOne2OneConversation :: Client Conversation createOne2OneConversation conv self other name mtid = do retry x5 $ case mtid of - Nothing -> write Cql.insertConv (params LocalQuorum (conv, One2OneConv, tUnqualified self, privateOnly, privateRole, fromRange <$> name, Nothing, Nothing, Nothing)) + Nothing -> write Cql.insertConv (params LocalQuorum (conv, One2OneConv, tUnqualified self, privateOnly, Cql.Set [], fromRange <$> name, Nothing, Nothing, Nothing)) Just tid -> batch $ do setType BatchLogged setConsistency LocalQuorum - addPrepQuery Cql.insertConv (conv, One2OneConv, tUnqualified self, privateOnly, privateRole, fromRange <$> name, Just tid, Nothing, Nothing) + addPrepQuery Cql.insertConv (conv, One2OneConv, tUnqualified self, privateOnly, Cql.Set [], fromRange <$> name, Just tid, Nothing, Nothing) addPrepQuery Cql.insertTeamConv (tid, conv, False) (lmems, rmems) <- addMembers conv (toUserList self [qUntagged self, other]) pure @@ -177,7 +178,7 @@ createOne2OneConversation conv self other name mtid = do convCreator = tUnqualified self, convName = fmap fromRange name, convAccess = [PrivateAccess], - convAccessRole = privateRole, + convAccessRoles = Set.empty, convLocalMembers = lmems, convRemoteMembers = rmems, convTeam = Nothing, @@ -192,7 +193,7 @@ createSelfConversation lusr name = do conv = selfConv usr lconv = qualifyAs lusr conv retry x5 $ - write Cql.insertConv (params LocalQuorum (conv, SelfConv, usr, privateOnly, privateRole, fromRange <$> name, Nothing, Nothing, Nothing)) + write Cql.insertConv (params LocalQuorum (conv, SelfConv, usr, privateOnly, Cql.Set [], fromRange <$> name, Nothing, Nothing, Nothing)) (lmems, rmems) <- addMembers (tUnqualified lconv) (UserList [tUnqualified lusr] []) pure Conversation @@ -201,7 +202,7 @@ createSelfConversation lusr name = do convCreator = usr, convName = fmap fromRange name, convAccess = [PrivateAccess], - convAccessRole = privateRole, + convAccessRoles = Set.empty, convLocalMembers = lmems, convRemoteMembers = rmems, convTeam = Nothing, @@ -227,8 +228,10 @@ conversationMeta conv = fmap toConvMeta <$> retry x1 (query1 Cql.selectConv (params LocalQuorum (Identity conv))) where - toConvMeta (t, c, a, r, n, i, _, mt, rm) = - ConversationMetadata t c (defAccess t a) (maybeRole t r) n i mt rm + toConvMeta (t, c, a, r, r', n, i, _, mt, rm) = + let mbAccessRolesV2 = Set.fromList . Cql.fromSet <$> r' + accessRoles = maybeRole t $ parseAccessRoles r mbAccessRolesV2 + in ConversationMetadata t c (defAccess t a) accessRoles n i mt rm isConvAlive :: ConvId -> Client Bool isConvAlive cid = do @@ -250,7 +253,7 @@ updateConvName cid name = retry x5 $ write Cql.updateConvName (params LocalQuoru updateConvAccess :: ConvId -> ConversationAccessData -> Client () updateConvAccess cid (ConversationAccessData acc role) = retry x5 $ - write Cql.updateConvAccess (params LocalQuorum (Cql.Set (toList acc), role, cid)) + write Cql.updateConvAccess (params LocalQuorum (Cql.Set (toList acc), Cql.Set (toList role), cid)) updateConvReceiptMode :: ConvId -> ReceiptMode -> Client () updateConvReceiptMode cid receiptMode = retry x5 $ write Cql.updateConvReceiptMode (params LocalQuorum (receiptMode, cid)) @@ -267,7 +270,7 @@ getConversation conv = do <$> members conv <*> UnliftIO.wait remoteMems <*> UnliftIO.wait cdata - return mbConv >>= conversationGC + conversationGC mbConv {- "Garbage collect" the conversation, i.e. the conversation may be marked as deleted, in which case we delete it and return Nothing -} @@ -298,7 +301,13 @@ localConversations ids = do where fetchConvs = do cs <- retry x1 $ query Cql.selectConvs (params LocalQuorum (Identity ids)) - let m = Map.fromList $ map (\(c, t, u, n, a, r, i, d, mt, rm) -> (c, (t, u, n, a, r, i, d, mt, rm))) cs + let m = + Map.fromList $ + map + ( \(cId, cType, uId, access, aRolesFromLegacy, aRoles, name, tId, del, timer, rm) -> + (cId, (cType, uId, access, aRolesFromLegacy, aRoles, name, tId, del, timer, rm)) + ) + cs return $ map (`Map.lookup` m) ids flatten (i, c) cc = case c of Nothing -> do @@ -337,12 +346,15 @@ toConv :: ConvId -> [LocalMember] -> [RemoteMember] -> - Maybe (ConvType, UserId, Maybe (Cql.Set Access), Maybe AccessRole, Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) -> + Maybe (ConvType, UserId, Maybe (Cql.Set Access), Maybe AccessRoleLegacy, Maybe (Cql.Set AccessRoleV2), Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) -> Maybe Conversation toConv cid mms remoteMems conv = f mms <$> conv where - f ms (cty, uid, acc, role, nme, ti, del, timer, rm) = Conversation cid cty uid nme (defAccess cty acc) (maybeRole cty role) ms remoteMems ti del timer rm + f ms (cty, uid, acc, role, roleV2, nme, ti, del, timer, rm) = + let mbAccessRolesV2 = Set.fromList . Cql.fromSet <$> roleV2 + accessRoles = maybeRole cty $ parseAccessRoles role mbAccessRolesV2 + in Conversation cid cty uid nme (defAccess cty acc) accessRoles ms remoteMems ti del timer rm interpretConversationStoreToCassandra :: Members '[Embed IO, Input ClientState, TinyLog] r => diff --git a/services/galley/src/Galley/Cassandra/Conversation/Members.hs b/services/galley/src/Galley/Cassandra/Conversation/Members.hs index 7e5e86ed596..c2692a7b74c 100644 --- a/services/galley/src/Galley/Cassandra/Conversation/Members.hs +++ b/services/galley/src/Galley/Cassandra/Conversation/Members.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/ConversationList.hs b/services/galley/src/Galley/Cassandra/ConversationList.hs index a183e209b92..ae8c03eb06f 100644 --- a/services/galley/src/Galley/Cassandra/ConversationList.hs +++ b/services/galley/src/Galley/Cassandra/ConversationList.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/CustomBackend.hs b/services/galley/src/Galley/Cassandra/CustomBackend.hs index da687a9cac3..8217b4239fb 100644 --- a/services/galley/src/Galley/Cassandra/CustomBackend.hs +++ b/services/galley/src/Galley/Cassandra/CustomBackend.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Instances.hs b/services/galley/src/Galley/Cassandra/Instances.hs index 198aa2675c0..8301c46ffb5 100644 --- a/services/galley/src/Galley/Cassandra/Instances.hs +++ b/services/galley/src/Galley/Cassandra/Instances.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -70,7 +70,7 @@ instance Cql Access where n -> Left $ "Unexpected Access value: " ++ show n fromCql _ = Left "Access value: int expected" -instance Cql AccessRole where +instance Cql AccessRoleLegacy where ctype = Tagged IntColumn toCql PrivateAccessRole = CqlInt 1 @@ -86,6 +86,23 @@ instance Cql AccessRole where n -> Left $ "Unexpected AccessRole value: " ++ show n fromCql _ = Left "AccessRole value: int expected" +instance Cql AccessRoleV2 where + ctype = Tagged IntColumn + + toCql = \case + TeamMemberAccessRole -> CqlInt 1 + NonTeamMemberAccessRole -> CqlInt 2 + GuestAccessRole -> CqlInt 3 + ServiceAccessRole -> CqlInt 4 + + fromCql (CqlInt i) = case i of + 1 -> return TeamMemberAccessRole + 2 -> return NonTeamMemberAccessRole + 3 -> return GuestAccessRole + 4 -> return ServiceAccessRole + n -> Left $ "Unexpected AccessRoleV2 value: " ++ show n + fromCql _ = Left "AccessRoleV2 value: int expected" + instance Cql ConvTeamInfo where ctype = Tagged $ UdtColumn "teaminfo" [("teamid", UuidColumn), ("managed", BooleanColumn)] diff --git a/services/galley/src/Galley/Cassandra/LegalHold.hs b/services/galley/src/Galley/Cassandra/LegalHold.hs index aa96b12559b..76673ba8ab1 100644 --- a/services/galley/src/Galley/Cassandra/LegalHold.hs +++ b/services/galley/src/Galley/Cassandra/LegalHold.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Paging.hs b/services/galley/src/Galley/Cassandra/Paging.hs index f4dd6a07c79..139a42df587 100644 --- a/services/galley/src/Galley/Cassandra/Paging.hs +++ b/services/galley/src/Galley/Cassandra/Paging.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Queries.hs b/services/galley/src/Galley/Cassandra/Queries.hs index 641fdcbe572..68b646a11cd 100644 --- a/services/galley/src/Galley/Cassandra/Queries.hs +++ b/services/galley/src/Galley/Cassandra/Queries.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -188,11 +188,11 @@ updateTeamStatus = "update team set status = ? where team = ?" -- Conversations ------------------------------------------------------------ -selectConv :: PrepQuery R (Identity ConvId) (ConvType, UserId, Maybe (C.Set Access), Maybe AccessRole, Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) -selectConv = "select type, creator, access, access_role, name, team, deleted, message_timer, receipt_mode from conversation where conv = ?" +selectConv :: PrepQuery R (Identity ConvId) (ConvType, UserId, Maybe (C.Set Access), Maybe AccessRoleLegacy, Maybe (C.Set AccessRoleV2), Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) +selectConv = "select type, creator, access, access_role, access_roles_v2, name, team, deleted, message_timer, receipt_mode from conversation where conv = ?" -selectConvs :: PrepQuery R (Identity [ConvId]) (ConvId, ConvType, UserId, Maybe (C.Set Access), Maybe AccessRole, Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) -selectConvs = "select conv, type, creator, access, access_role, name, team, deleted, message_timer, receipt_mode from conversation where conv in ?" +selectConvs :: PrepQuery R (Identity [ConvId]) (ConvId, ConvType, UserId, Maybe (C.Set Access), Maybe AccessRoleLegacy, Maybe (C.Set AccessRoleV2), Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode) +selectConvs = "select conv, type, creator, access, access_role, access_roles_v2, name, team, deleted, message_timer, receipt_mode from conversation where conv in ?" selectReceiptMode :: PrepQuery R (Identity ConvId) (Identity (Maybe ReceiptMode)) selectReceiptMode = "select receipt_mode from conversation where conv = ?" @@ -200,11 +200,11 @@ selectReceiptMode = "select receipt_mode from conversation where conv = ?" isConvDeleted :: PrepQuery R (Identity ConvId) (Identity (Maybe Bool)) isConvDeleted = "select deleted from conversation where conv = ?" -insertConv :: PrepQuery W (ConvId, ConvType, UserId, C.Set Access, AccessRole, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode) () -insertConv = "insert into conversation (conv, type, creator, access, access_role, name, team, message_timer, receipt_mode) values (?, ?, ?, ?, ?, ?, ?, ?, ?)" +insertConv :: PrepQuery W (ConvId, ConvType, UserId, C.Set Access, C.Set AccessRoleV2, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode) () +insertConv = "insert into conversation (conv, type, creator, access, access_roles_v2, name, team, message_timer, receipt_mode) values (?, ?, ?, ?, ?, ?, ?, ?, ?)" -updateConvAccess :: PrepQuery W (C.Set Access, AccessRole, ConvId) () -updateConvAccess = "update conversation set access = ?, access_role = ? where conv = ?" +updateConvAccess :: PrepQuery W (C.Set Access, C.Set AccessRoleV2, ConvId) () +updateConvAccess = "update conversation set access = ?, access_roles_v2 = ? where conv = ?" updateConvReceiptMode :: PrepQuery W (ReceiptMode, ConvId) () updateConvReceiptMode = "update conversation set receipt_mode = ? where conv = ?" diff --git a/services/galley/src/Galley/Cassandra/ResultSet.hs b/services/galley/src/Galley/Cassandra/ResultSet.hs index 441a5baa40c..5d8f801f88a 100644 --- a/services/galley/src/Galley/Cassandra/ResultSet.hs +++ b/services/galley/src/Galley/Cassandra/ResultSet.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/SearchVisibility.hs b/services/galley/src/Galley/Cassandra/SearchVisibility.hs index 136ac414c0d..58277e9c5b5 100644 --- a/services/galley/src/Galley/Cassandra/SearchVisibility.hs +++ b/services/galley/src/Galley/Cassandra/SearchVisibility.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Services.hs b/services/galley/src/Galley/Cassandra/Services.hs index 785502a988f..765da19bb1e 100644 --- a/services/galley/src/Galley/Cassandra/Services.hs +++ b/services/galley/src/Galley/Cassandra/Services.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Store.hs b/services/galley/src/Galley/Cassandra/Store.hs index 07a876e02aa..6c68eaf48c1 100644 --- a/services/galley/src/Galley/Cassandra/Store.hs +++ b/services/galley/src/Galley/Cassandra/Store.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/Team.hs b/services/galley/src/Galley/Cassandra/Team.hs index a89af42d6d4..2e6171bf8b0 100644 --- a/services/galley/src/Galley/Cassandra/Team.hs +++ b/services/galley/src/Galley/Cassandra/Team.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/TeamFeatures.hs b/services/galley/src/Galley/Cassandra/TeamFeatures.hs index 4bd104cbe9e..5af026c6b0b 100644 --- a/services/galley/src/Galley/Cassandra/TeamFeatures.hs +++ b/services/galley/src/Galley/Cassandra/TeamFeatures.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Cassandra/TeamNotifications.hs b/services/galley/src/Galley/Cassandra/TeamNotifications.hs index dc0cb800c78..e3177d79a20 100644 --- a/services/galley/src/Galley/Cassandra/TeamNotifications.hs +++ b/services/galley/src/Galley/Cassandra/TeamNotifications.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Data/Conversation.hs b/services/galley/src/Galley/Data/Conversation.hs index b1e149b6513..9875af57a4e 100644 --- a/services/galley/src/Galley/Data/Conversation.hs +++ b/services/galley/src/Galley/Data/Conversation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -31,12 +31,13 @@ module Galley.Data.Conversation convAccessData, defRole, maybeRole, - privateRole, defRegularConvAccess, + parseAccessRoles, ) where import Data.Id +import Data.Set (Set) import qualified Data.Set as Set import qualified Data.UUID.Tagged as U import Galley.Cassandra.Instances () @@ -72,7 +73,7 @@ convMetadata c = (convType c) (convCreator c) (convAccess c) - (convAccessRole c) + (convAccessRoles c) (convName c) (convTeam c) (convMessageTimer c) @@ -82,20 +83,10 @@ convAccessData :: Conversation -> ConversationAccessData convAccessData conv = ConversationAccessData (Set.fromList (convAccess conv)) - (convAccessRole conv) - -defRole :: AccessRole -defRole = ActivatedAccessRole - -maybeRole :: ConvType -> Maybe AccessRole -> AccessRole -maybeRole SelfConv _ = privateRole -maybeRole ConnectConv _ = privateRole -maybeRole One2OneConv _ = privateRole -maybeRole RegularConv Nothing = defRole -maybeRole RegularConv (Just r) = r - -privateRole :: AccessRole -privateRole = PrivateAccessRole + (convAccessRoles conv) defRegularConvAccess :: [Access] defRegularConvAccess = [InviteAccess] + +parseAccessRoles :: Maybe AccessRoleLegacy -> Maybe (Set AccessRoleV2) -> Maybe (Set AccessRoleV2) +parseAccessRoles mbLegacy mbV2 = mbV2 <|> fromAccessRoleLegacy <$> mbLegacy diff --git a/services/galley/src/Galley/Data/Conversation/Types.hs b/services/galley/src/Galley/Data/Conversation/Types.hs index 6fb47c221da..fa50d7b7b11 100644 --- a/services/galley/src/Galley/Data/Conversation/Types.hs +++ b/services/galley/src/Galley/Data/Conversation/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -36,7 +36,7 @@ data Conversation = Conversation convCreator :: UserId, convName :: Maybe Text, convAccess :: [Access], - convAccessRole :: AccessRole, + convAccessRoles :: Set AccessRoleV2, convLocalMembers :: [LocalMember], convRemoteMembers :: [RemoteMember], convTeam :: Maybe TeamId, @@ -51,7 +51,7 @@ data NewConversation = NewConversation { ncType :: ConvType, ncCreator :: UserId, ncAccess :: [Access], - ncAccessRole :: AccessRole, + ncAccessRoles :: Set AccessRoleV2, ncName :: Maybe (Range 1 256 Text), ncTeam :: Maybe TeamId, ncMessageTimer :: Maybe Milliseconds, diff --git a/services/galley/src/Galley/Data/Scope.hs b/services/galley/src/Galley/Data/Scope.hs index e966ca284ee..f7546e6b4bb 100644 --- a/services/galley/src/Galley/Data/Scope.hs +++ b/services/galley/src/Galley/Data/Scope.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Data/Services.hs b/services/galley/src/Galley/Data/Services.hs index a8c21ead628..099070685b0 100644 --- a/services/galley/src/Galley/Data/Services.hs +++ b/services/galley/src/Galley/Data/Services.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Data/TeamFeatures.hs b/services/galley/src/Galley/Data/TeamFeatures.hs index 8d694625601..6fd0c910c56 100644 --- a/services/galley/src/Galley/Data/TeamFeatures.hs +++ b/services/galley/src/Galley/Data/TeamFeatures.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Data/TeamNotifications.hs b/services/galley/src/Galley/Data/TeamNotifications.hs index faeff5edd97..daf91209e5e 100644 --- a/services/galley/src/Galley/Data/TeamNotifications.hs +++ b/services/galley/src/Galley/Data/TeamNotifications.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Data/Types.hs b/services/galley/src/Galley/Data/Types.hs index 3aae3e50eed..ece135e4d73 100644 --- a/services/galley/src/Galley/Data/Types.hs +++ b/services/galley/src/Galley/Data/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects.hs b/services/galley/src/Galley/Effects.hs index 68912c86c94..143116f5ede 100644 --- a/services/galley/src/Galley/Effects.hs +++ b/services/galley/src/Galley/Effects.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/BotAccess.hs b/services/galley/src/Galley/Effects/BotAccess.hs index 819fde49082..9a7c3eee470 100644 --- a/services/galley/src/Galley/Effects/BotAccess.hs +++ b/services/galley/src/Galley/Effects/BotAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/BrigAccess.hs b/services/galley/src/Galley/Effects/BrigAccess.hs index 7ff6b448b00..8bae5c20b8d 100644 --- a/services/galley/src/Galley/Effects/BrigAccess.hs +++ b/services/galley/src/Galley/Effects/BrigAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/ClientStore.hs b/services/galley/src/Galley/Effects/ClientStore.hs index 26250ba3a4b..d73670d0859 100644 --- a/services/galley/src/Galley/Effects/ClientStore.hs +++ b/services/galley/src/Galley/Effects/ClientStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/CodeStore.hs b/services/galley/src/Galley/Effects/CodeStore.hs index 0920da520a7..a321a01d2d2 100644 --- a/services/galley/src/Galley/Effects/CodeStore.hs +++ b/services/galley/src/Galley/Effects/CodeStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/ConversationStore.hs b/services/galley/src/Galley/Effects/ConversationStore.hs index c1ee62e5d64..d0233ce930e 100644 --- a/services/galley/src/Galley/Effects/ConversationStore.hs +++ b/services/galley/src/Galley/Effects/ConversationStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/CustomBackendStore.hs b/services/galley/src/Galley/Effects/CustomBackendStore.hs index cd3fc723009..341bb73d655 100644 --- a/services/galley/src/Galley/Effects/CustomBackendStore.hs +++ b/services/galley/src/Galley/Effects/CustomBackendStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/ExternalAccess.hs b/services/galley/src/Galley/Effects/ExternalAccess.hs index 81889aed8af..c4f6b5fe8be 100644 --- a/services/galley/src/Galley/Effects/ExternalAccess.hs +++ b/services/galley/src/Galley/Effects/ExternalAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/FederatorAccess.hs b/services/galley/src/Galley/Effects/FederatorAccess.hs index 12cad3a36a3..e3c4737a590 100644 --- a/services/galley/src/Galley/Effects/FederatorAccess.hs +++ b/services/galley/src/Galley/Effects/FederatorAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/FireAndForget.hs b/services/galley/src/Galley/Effects/FireAndForget.hs index 73ff93d3778..cee3625425f 100644 --- a/services/galley/src/Galley/Effects/FireAndForget.hs +++ b/services/galley/src/Galley/Effects/FireAndForget.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/GundeckAccess.hs b/services/galley/src/Galley/Effects/GundeckAccess.hs index 93308d6e635..819b6fe0fbc 100644 --- a/services/galley/src/Galley/Effects/GundeckAccess.hs +++ b/services/galley/src/Galley/Effects/GundeckAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/LegalHoldStore.hs b/services/galley/src/Galley/Effects/LegalHoldStore.hs index 4dab3fbefb7..59455a774eb 100644 --- a/services/galley/src/Galley/Effects/LegalHoldStore.hs +++ b/services/galley/src/Galley/Effects/LegalHoldStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/ListItems.hs b/services/galley/src/Galley/Effects/ListItems.hs index 0fe007f4963..1c6d34cf223 100644 --- a/services/galley/src/Galley/Effects/ListItems.hs +++ b/services/galley/src/Galley/Effects/ListItems.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/MemberStore.hs b/services/galley/src/Galley/Effects/MemberStore.hs index 80688a48935..f0b936e1105 100644 --- a/services/galley/src/Galley/Effects/MemberStore.hs +++ b/services/galley/src/Galley/Effects/MemberStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/Paging.hs b/services/galley/src/Galley/Effects/Paging.hs index 8fec9b20f6a..8df8e9393af 100644 --- a/services/galley/src/Galley/Effects/Paging.hs +++ b/services/galley/src/Galley/Effects/Paging.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/Queue.hs b/services/galley/src/Galley/Effects/Queue.hs index 111ab6d2946..d24e995f6ba 100644 --- a/services/galley/src/Galley/Effects/Queue.hs +++ b/services/galley/src/Galley/Effects/Queue.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/RemoteConversationListStore.hs b/services/galley/src/Galley/Effects/RemoteConversationListStore.hs index e1dec1ce376..1cc0e0610c4 100644 --- a/services/galley/src/Galley/Effects/RemoteConversationListStore.hs +++ b/services/galley/src/Galley/Effects/RemoteConversationListStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/SearchVisibilityStore.hs b/services/galley/src/Galley/Effects/SearchVisibilityStore.hs index 28a9b394c32..a3aa7b7a9e9 100644 --- a/services/galley/src/Galley/Effects/SearchVisibilityStore.hs +++ b/services/galley/src/Galley/Effects/SearchVisibilityStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/ServiceStore.hs b/services/galley/src/Galley/Effects/ServiceStore.hs index f9305e75090..c7a4b680590 100644 --- a/services/galley/src/Galley/Effects/ServiceStore.hs +++ b/services/galley/src/Galley/Effects/ServiceStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/SparAccess.hs b/services/galley/src/Galley/Effects/SparAccess.hs index b8479858aa7..7eb4776ee8d 100644 --- a/services/galley/src/Galley/Effects/SparAccess.hs +++ b/services/galley/src/Galley/Effects/SparAccess.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/TeamFeatureStore.hs b/services/galley/src/Galley/Effects/TeamFeatureStore.hs index a71bac93714..47b78fe6b5f 100644 --- a/services/galley/src/Galley/Effects/TeamFeatureStore.hs +++ b/services/galley/src/Galley/Effects/TeamFeatureStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/TeamMemberStore.hs b/services/galley/src/Galley/Effects/TeamMemberStore.hs index 618d349ec1f..8bc40656fbe 100644 --- a/services/galley/src/Galley/Effects/TeamMemberStore.hs +++ b/services/galley/src/Galley/Effects/TeamMemberStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/TeamNotificationStore.hs b/services/galley/src/Galley/Effects/TeamNotificationStore.hs index 23f4d7ed846..3dfb60999b6 100644 --- a/services/galley/src/Galley/Effects/TeamNotificationStore.hs +++ b/services/galley/src/Galley/Effects/TeamNotificationStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/TeamStore.hs b/services/galley/src/Galley/Effects/TeamStore.hs index 18eee5f98ca..7521bc0d7de 100644 --- a/services/galley/src/Galley/Effects/TeamStore.hs +++ b/services/galley/src/Galley/Effects/TeamStore.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/WaiRoutes.hs b/services/galley/src/Galley/Effects/WaiRoutes.hs index 3e3a43a5389..4047bcc1f43 100644 --- a/services/galley/src/Galley/Effects/WaiRoutes.hs +++ b/services/galley/src/Galley/Effects/WaiRoutes.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Effects/WaiRoutes/IO.hs b/services/galley/src/Galley/Effects/WaiRoutes/IO.hs index a71aba6080b..9a5da38e869 100644 --- a/services/galley/src/Galley/Effects/WaiRoutes/IO.hs +++ b/services/galley/src/Galley/Effects/WaiRoutes/IO.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Env.hs b/services/galley/src/Galley/Env.hs index bff564836eb..5b4b02d98fa 100644 --- a/services/galley/src/Galley/Env.hs +++ b/services/galley/src/Galley/Env.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/External.hs b/services/galley/src/Galley/External.hs index d25d3db1900..a695155f302 100644 --- a/services/galley/src/Galley/External.hs +++ b/services/galley/src/Galley/External.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/External/LegalHoldService.hs b/services/galley/src/Galley/External/LegalHoldService.hs index 14dee18e6ac..4a05f727fd3 100644 --- a/services/galley/src/Galley/External/LegalHoldService.hs +++ b/services/galley/src/Galley/External/LegalHoldService.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/External/LegalHoldService/Internal.hs b/services/galley/src/Galley/External/LegalHoldService/Internal.hs index 47836150ad4..bd0768d8ed0 100644 --- a/services/galley/src/Galley/External/LegalHoldService/Internal.hs +++ b/services/galley/src/Galley/External/LegalHoldService/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/External/LegalHoldService/Types.hs b/services/galley/src/Galley/External/LegalHoldService/Types.hs index 8a3f671bcf5..74fbc69e1a5 100644 --- a/services/galley/src/Galley/External/LegalHoldService/Types.hs +++ b/services/galley/src/Galley/External/LegalHoldService/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Client.hs b/services/galley/src/Galley/Intra/Client.hs index 59587ed99c7..902d662b1fc 100644 --- a/services/galley/src/Galley/Intra/Client.hs +++ b/services/galley/src/Galley/Intra/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Effects.hs b/services/galley/src/Galley/Intra/Effects.hs index a282b00d04d..80375fcb8b3 100644 --- a/services/galley/src/Galley/Intra/Effects.hs +++ b/services/galley/src/Galley/Intra/Effects.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Federator.hs b/services/galley/src/Galley/Intra/Federator.hs index 89af2a90b1d..caa0d499e89 100644 --- a/services/galley/src/Galley/Intra/Federator.hs +++ b/services/galley/src/Galley/Intra/Federator.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Journal.hs b/services/galley/src/Galley/Intra/Journal.hs index 7cfd6eb8f8f..3d1a9bfd078 100644 --- a/services/galley/src/Galley/Intra/Journal.hs +++ b/services/galley/src/Galley/Intra/Journal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Push.hs b/services/galley/src/Galley/Intra/Push.hs index 71292655ac5..4486bf94a85 100644 --- a/services/galley/src/Galley/Intra/Push.hs +++ b/services/galley/src/Galley/Intra/Push.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Push/Internal.hs b/services/galley/src/Galley/Intra/Push/Internal.hs index 7204753a8b9..9cfce24cad9 100644 --- a/services/galley/src/Galley/Intra/Push/Internal.hs +++ b/services/galley/src/Galley/Intra/Push/Internal.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Spar.hs b/services/galley/src/Galley/Intra/Spar.hs index 73836adee43..510aa3720f7 100644 --- a/services/galley/src/Galley/Intra/Spar.hs +++ b/services/galley/src/Galley/Intra/Spar.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Team.hs b/services/galley/src/Galley/Intra/Team.hs index ad6f0e0ebf4..ebe748c1235 100644 --- a/services/galley/src/Galley/Intra/Team.hs +++ b/services/galley/src/Galley/Intra/Team.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/User.hs b/services/galley/src/Galley/Intra/User.hs index 70a0483ebc7..ad4482370f5 100644 --- a/services/galley/src/Galley/Intra/User.hs +++ b/services/galley/src/Galley/Intra/User.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Intra/Util.hs b/services/galley/src/Galley/Intra/Util.hs index 17c83c5b0a8..06fadd4ff50 100644 --- a/services/galley/src/Galley/Intra/Util.hs +++ b/services/galley/src/Galley/Intra/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Monad.hs b/services/galley/src/Galley/Monad.hs index 1148a1a0de8..f880dfd4985 100644 --- a/services/galley/src/Galley/Monad.hs +++ b/services/galley/src/Galley/Monad.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Options.hs b/services/galley/src/Galley/Options.hs index d51a346bcdd..3c62289fb71 100644 --- a/services/galley/src/Galley/Options.hs +++ b/services/galley/src/Galley/Options.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Queue.hs b/services/galley/src/Galley/Queue.hs index 96534fc84bd..dc72bc290f7 100644 --- a/services/galley/src/Galley/Queue.hs +++ b/services/galley/src/Galley/Queue.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Run.hs b/services/galley/src/Galley/Run.hs index 18f5a8d0e70..fcf0b8839ed 100644 --- a/services/galley/src/Galley/Run.hs +++ b/services/galley/src/Galley/Run.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Types/Clients.hs b/services/galley/src/Galley/Types/Clients.hs index 4bc3037dd5f..6db58d20342 100644 --- a/services/galley/src/Galley/Types/Clients.hs +++ b/services/galley/src/Galley/Types/Clients.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Types/ToUserRole.hs b/services/galley/src/Galley/Types/ToUserRole.hs index d68b87d514e..c967e508014 100644 --- a/services/galley/src/Galley/Types/ToUserRole.hs +++ b/services/galley/src/Galley/Types/ToUserRole.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Types/UserList.hs b/services/galley/src/Galley/Types/UserList.hs index c63148d6b97..392207eac49 100644 --- a/services/galley/src/Galley/Types/UserList.hs +++ b/services/galley/src/Galley/Types/UserList.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/Validation.hs b/services/galley/src/Galley/Validation.hs index b3aad0e32df..0e599a212d9 100644 --- a/services/galley/src/Galley/Validation.hs +++ b/services/galley/src/Galley/Validation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Main.hs b/services/galley/src/Main.hs index 27ff9f3f4d8..df1333e73a9 100644 --- a/services/galley/src/Main.hs +++ b/services/galley/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API.hs b/services/galley/test/integration/API.hs index f1e16b0fbd3..6598df2a2e4 100644 --- a/services/galley/test/integration/API.hs +++ b/services/galley/test/integration/API.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -320,7 +320,7 @@ postConvWithRemoteUsersOk = do F.rcCnvId cFedReqBody @?= cid F.rcCnvType cFedReqBody @?= RegularConv F.rcCnvAccess cFedReqBody @?= [InviteAccess] - F.rcCnvAccessRole cFedReqBody @?= ActivatedAccessRole + F.rcCnvAccessRoles cFedReqBody @?= Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, ServiceAccessRole] F.rcCnvName cFedReqBody @?= Just nameMaxSize F.rcNonCreatorMembers cFedReqBody @?= Set.fromList (toOtherMember <$> [qAlex, qAmy, qChad, qCharlie, qDee]) F.rcMessageTimer cFedReqBody @?= Nothing @@ -1192,7 +1192,7 @@ testJoinCodeConv = do let convName = "gossip" alice <- randomUser - convId <- decodeConvId <$> postConv alice [] (Just convName) [CodeAccess] (Just ActivatedAccessRole) Nothing + convId <- decodeConvId <$> postConv alice [] (Just convName) [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing cCode <- decodeConvCodeEvent <$> postConvCode alice convId qbob <- randomQualifiedUser @@ -1210,7 +1210,7 @@ testGetCodeRejectedIfGuestLinksDisabled = do galley <- view tsGalley (owner, teamId, []) <- Util.createBindingTeamWithNMembers 0 let createConvWithGuestLink = do - convId <- decodeConvId <$> postTeamConv teamId owner [] (Just "testConversation") [CodeAccess] (Just ActivatedAccessRole) Nothing + convId <- decodeConvId <$> postTeamConv teamId owner [] (Just "testConversation") [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing void $ decodeConvCodeEvent <$> postConvCode owner convId pure convId convId <- createConvWithGuestLink @@ -1229,7 +1229,7 @@ testPostCodeRejectedIfGuestLinksDisabled :: TestM () testPostCodeRejectedIfGuestLinksDisabled = do galley <- view tsGalley (owner, teamId, []) <- Util.createBindingTeamWithNMembers 0 - convId <- decodeConvId <$> postTeamConv teamId owner [] (Just "testConversation") [CodeAccess] (Just ActivatedAccessRole) Nothing + convId <- decodeConvId <$> postTeamConv teamId owner [] (Just "testConversation") [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing let checkPostCode expectedStatus = postConvCode owner convId !!! statusCode === const expectedStatus let setStatus tfStatus = TeamFeatures.putTeamFeatureFlagWithGalley @'Public.TeamFeatureGuestLinks galley owner teamId (Public.TeamFeatureStatusNoConfig tfStatus) !!! do @@ -1247,7 +1247,7 @@ testJoinTeamConvGuestLinksDisabled = do let convName = "testConversation" (owner, teamId, []) <- Util.createBindingTeamWithNMembers 0 userNotInTeam <- randomUser - convId <- decodeConvId <$> postTeamConv teamId owner [] (Just convName) [CodeAccess] (Just ActivatedAccessRole) Nothing + convId <- decodeConvId <$> postTeamConv teamId owner [] (Just convName) [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing cCode <- decodeConvCodeEvent <$> postConvCode owner convId -- works by default @@ -1278,7 +1278,7 @@ testJoinNonTeamConvGuestLinksDisabled = do let convName = "testConversation" (owner, teamId, []) <- Util.createBindingTeamWithNMembers 0 userNotInTeam <- randomUser - convId <- decodeConvId <$> postConv owner [] (Just convName) [CodeAccess] (Just ActivatedAccessRole) Nothing + convId <- decodeConvId <$> postConv owner [] (Just convName) [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing cCode <- decodeConvCodeEvent <$> postConvCode owner convId -- works by default @@ -1303,7 +1303,7 @@ postJoinCodeConvOk = do let bob = qUnqualified qbob eve <- ephemeralUser dave <- ephemeralUser - conv <- decodeConvId <$> postConv alice [] (Just "gossip") [CodeAccess] (Just ActivatedAccessRole) Nothing + conv <- decodeConvId <$> postConv alice [] (Just "gossip") [CodeAccess] (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole])) Nothing let qconv = Qualified conv (qDomain qbob) cCode <- decodeConvCodeEvent <$> postConvCode alice conv -- currently ConversationCode is used both as return type for POST ../code and as body for ../join @@ -1326,11 +1326,11 @@ postJoinCodeConvOk = do WS.assertMatchN (5 # Second) [wsA, wsB] $ wsAssertMemberJoinWithRole qconv qbob [qbob] roleNameWireMember -- changing access to non-activated should give eve access - let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) NonActivatedAccessRole + let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate alice conv nonActivatedAccess !!! const 200 === statusCode postJoinCodeConv eve payload !!! const 200 === statusCode -- after removing CodeAccess, no further people can join - let noCodeAccess = ConversationAccessData (Set.singleton InviteAccess) NonActivatedAccessRole + let noCodeAccess = ConversationAccessData (Set.singleton InviteAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate alice conv noCodeAccess !!! const 200 === statusCode postJoinCodeConv dave payload !!! const 404 === statusCode @@ -1345,15 +1345,15 @@ postConvertCodeConv = do postConvCode alice conv !!! const 403 === statusCode deleteConvCode alice conv !!! const 403 === statusCode getConvCode alice conv !!! const 403 === statusCode - -- cannot change to TeamAccessRole as not a team conversation - let teamAccess = ConversationAccessData (Set.singleton InviteAccess) TeamAccessRole + -- cannot change to (Set.fromList [TeamMemberAccessRole]) as not a team conversation + let teamAccess = ConversationAccessData (Set.singleton InviteAccess) (Set.fromList [TeamMemberAccessRole]) putAccessUpdate alice conv teamAccess !!! const 403 === statusCode -- change access WS.bracketR c alice $ \wsA -> do let nonActivatedAccess = ConversationAccessData (Set.fromList [InviteAccess, CodeAccess]) - NonActivatedAccessRole + (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate alice conv nonActivatedAccess !!! const 200 === statusCode -- test no-op putAccessUpdate alice conv nonActivatedAccess !!! const 204 === statusCode @@ -1373,7 +1373,7 @@ postConvertCodeConv = do getConvCode alice conv !!! const 404 === statusCode -- create a new code; then revoking CodeAccess should make existing codes invalid void $ postConvCode alice conv - let noCodeAccess = ConversationAccessData (Set.singleton InviteAccess) NonActivatedAccessRole + let noCodeAccess = ConversationAccessData (Set.singleton InviteAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate alice conv noCodeAccess !!! const 200 === statusCode getConvCode alice conv !!! const 403 === statusCode @@ -1395,10 +1395,10 @@ postConvertTeamConv = do connectUsers alice (singleton eve) let acc = Just $ Set.fromList [InviteAccess, CodeAccess] -- creating a team-only conversation containing eve should fail - createTeamConvAccessRaw alice tid [bob, eve] (Just "blaa") acc (Just TeamAccessRole) Nothing Nothing + createTeamConvAccessRaw alice tid [bob, eve] (Just "blaa") acc (Just (Set.fromList [TeamMemberAccessRole])) Nothing Nothing !!! const 403 === statusCode -- create conversation allowing any type of guest - conv <- createTeamConvAccess alice tid [bob, eve] (Just "blaa") acc (Just NonActivatedAccessRole) Nothing Nothing + conv <- createTeamConvAccess alice tid [bob, eve] (Just "blaa") acc (Just (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole])) Nothing Nothing -- mallory joins by herself mallory <- ephemeralUser let qmallory = Qualified mallory localDomain @@ -1413,7 +1413,7 @@ postConvertTeamConv = do let teamAccess = ConversationAccessData (Set.fromList [InviteAccess, CodeAccess]) - TeamAccessRole + (Set.fromList [TeamMemberAccessRole]) putAccessUpdate alice conv teamAccess !!! const 200 === statusCode void . liftIO $ WS.assertMatchN (5 # Second) [wsA, wsB, wsE, wsM] $ @@ -1427,6 +1427,11 @@ postConvertTeamConv = do -- team members (dave) can still join postJoinCodeConv dave j !!! const 200 === statusCode +-- @SF.Federation @SF.Separation @TSFI.RESTfulAPI @S2 +-- +-- The test asserts that, among others, remote users are removed from a +-- conversation when an access update occurs that disallows guests from +-- accessing. testAccessUpdateGuestRemoved :: TestM () testAccessUpdateGuestRemoved = do -- alice, bob are in a team @@ -1460,7 +1465,7 @@ testAccessUpdateGuestRemoved = do putQualifiedAccessUpdate (qUnqualified alice) (cnvQualifiedId conv) - (ConversationAccessData mempty TeamAccessRole) + (ConversationAccessData mempty (Set.fromList [TeamMemberAccessRole])) !!! const 200 === statusCode -- charlie and dee are kicked out @@ -1486,6 +1491,8 @@ testAccessUpdateGuestRemoved = do quids, F.rcMessageTimer = Nothing, diff --git a/services/galley/test/integration/API/CustomBackend.hs b/services/galley/test/integration/API/CustomBackend.hs index e62fc532ca0..289ba81efeb 100644 --- a/services/galley/test/integration/API/CustomBackend.hs +++ b/services/galley/test/integration/API/CustomBackend.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API/Federation.hs b/services/galley/test/integration/API/Federation.hs index adbfafd507f..21086153d52 100644 --- a/services/galley/test/integration/API/Federation.hs +++ b/services/galley/test/integration/API/Federation.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Federation where import API.Util @@ -154,6 +171,11 @@ getConversationsAllFound = do (Just (sort [bob, qUnqualified carlQ])) (fmap (sort . map (qUnqualified . omQualifiedId) . rcmOthers . rcnvMembers) c2) +-- @SF.Federation @TSFI.RESTfulAPI @S2 +-- +-- The test asserts that via a federation client a user cannot fetch +-- conversation details of a conversation they are not part of: they get an +-- empty list of details instead. getConversationsNotPartOf :: TestM () getConversationsNotPartOf = do -- FUTUREWORK: make alice / bob remote users @@ -173,6 +195,8 @@ getConversationsNotPartOf = do GetConversationsRequest rando [qUnqualified . cnvQualifiedId $ cnv1] liftIO $ assertEqual "conversation list not empty" [] convs +-- @END + onConvCreated :: TestM () onConvCreated = do c <- view tsCannon @@ -481,7 +505,7 @@ notifyReceiptMode = do notifyAccess :: TestM () notifyAccess = do - let d = ConversationAccessData (Set.fromList [InviteAccess, LinkAccess]) TeamAccessRole + let d = ConversationAccessData (Set.fromList [InviteAccess, LinkAccess]) (Set.fromList [TeamMemberAccessRole]) notifyUpdate [] (ConversationActionAccessUpdate d) diff --git a/services/galley/test/integration/API/MessageTimer.hs b/services/galley/test/integration/API/MessageTimer.hs index e773e3a5491..2339a993aba 100644 --- a/services/galley/test/integration/API/MessageTimer.hs +++ b/services/galley/test/integration/API/MessageTimer.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API/Roles.hs b/services/galley/test/integration/API/Roles.hs index 0ef2b52ef11..9da167a2c0c 100644 --- a/services/galley/test/integration/API/Roles.hs +++ b/services/galley/test/integration/API/Roles.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -300,7 +300,7 @@ accessUpdateWithRemotes = do defNewConv {newConvQualifiedUsers = [qalice, qcharlie]} let qconv = decodeQualifiedConvId resp - let access = ConversationAccessData (Set.singleton CodeAccess) NonActivatedAccessRole + let access = ConversationAccessData (Set.singleton CodeAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) WS.bracketR2 c bob charlie $ \(wsB, wsC) -> do (_, requests) <- withTempMockFederator (const ()) $ @@ -359,9 +359,9 @@ wireAdminChecks cid admin otherAdmin mem = do putMessageTimerUpdate admin cid (ConversationMessageTimerUpdate $ Just 2000) !!! assertActionSucceeded putReceiptMode admin cid (ReceiptMode 0) !!! assertActionSucceeded putReceiptMode admin cid (ReceiptMode 1) !!! assertActionSucceeded - let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) NonActivatedAccessRole + let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate admin cid nonActivatedAccess !!! assertActionSucceeded - let activatedAccess = ConversationAccessData (Set.singleton InviteAccess) NonActivatedAccessRole + let activatedAccess = ConversationAccessData (Set.singleton InviteAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate admin cid activatedAccess !!! assertActionSucceeded -- Update your own member state let memUpdate = memberUpdate {mupOtrArchive = Just True} @@ -404,7 +404,7 @@ wireMemberChecks cid mem admin otherMem = do -- No updates for message timer, receipt mode or access putMessageTimerUpdate mem cid (ConversationMessageTimerUpdate Nothing) !!! assertActionDenied putReceiptMode mem cid (ReceiptMode 0) !!! assertActionDenied - let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) NonActivatedAccessRole + let nonActivatedAccess = ConversationAccessData (Set.singleton CodeAccess) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole, GuestAccessRole, ServiceAccessRole]) putAccessUpdate mem cid nonActivatedAccess !!! assertActionDenied -- Finally, you can still do the following actions: diff --git a/services/galley/test/integration/API/SQS.hs b/services/galley/test/integration/API/SQS.hs index 39df527dbef..d8fbc5f475e 100644 --- a/services/galley/test/integration/API/SQS.hs +++ b/services/galley/test/integration/API/SQS.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index 25c5d03f4a3..f1428b2c4db 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -875,7 +875,7 @@ testAddTeamConvAsExternalPartner = do [memMember1 ^. userId, memMember2 ^. userId] (Just "blaa") acc - (Just TeamAccessRole) + (Just (Set.fromList [TeamMemberAccessRole])) Nothing Nothing !!! do @@ -1208,7 +1208,7 @@ testDeleteTeamConv = do Util.connectUsers owner (list1 (member ^. userId) [extern]) tid <- Util.createNonBindingTeam "foo" owner [member] cid1 <- Util.createTeamConv owner tid [] (Just "blaa") Nothing Nothing - let access = ConversationAccessData (Set.fromList [InviteAccess, CodeAccess]) ActivatedAccessRole + let access = ConversationAccessData (Set.fromList [InviteAccess, CodeAccess]) (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole]) putAccessUpdate owner cid1 access !!! const 200 === statusCode code <- decodeConvCodeEvent <$> (postConvCode owner cid1 members) (Just "blup") Nothing Nothing diff --git a/services/galley/test/integration/API/Teams/Feature.hs b/services/galley/test/integration/API/Teams/Feature.hs index 04c283203de..81152271945 100644 --- a/services/galley/test/integration/API/Teams/Feature.hs +++ b/services/galley/test/integration/API/Teams/Feature.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API/Teams/LegalHold.hs b/services/galley/test/integration/API/Teams/LegalHold.hs index d44974b5f73..40ff822f854 100644 --- a/services/galley/test/integration/API/Teams/LegalHold.hs +++ b/services/galley/test/integration/API/Teams/LegalHold.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/API/Teams/LegalHold/DisabledByDefault.hs b/services/galley/test/integration/API/Teams/LegalHold/DisabledByDefault.hs index d5814514e61..1ed84312094 100644 --- a/services/galley/test/integration/API/Teams/LegalHold/DisabledByDefault.hs +++ b/services/galley/test/integration/API/Teams/LegalHold/DisabledByDefault.hs @@ -18,6 +18,23 @@ {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {-# OPTIONS_GHC -Wno-orphans #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module API.Teams.LegalHold.DisabledByDefault ( tests, ) diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index 5ceee3a5303..bc920d97035 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -506,12 +506,12 @@ createTeamConv u tid us name acc mtimer = createTeamConvAccess u tid us name acc createTeamConvWithRole :: HasCallStack => UserId -> TeamId -> [UserId] -> Maybe Text -> Maybe (Set Access) -> Maybe Milliseconds -> RoleName -> TestM ConvId createTeamConvWithRole u tid us name acc mtimer convRole = createTeamConvAccess u tid us name acc Nothing mtimer (Just convRole) -createTeamConvAccess :: HasCallStack => UserId -> TeamId -> [UserId] -> Maybe Text -> Maybe (Set Access) -> Maybe AccessRole -> Maybe Milliseconds -> Maybe RoleName -> TestM ConvId +createTeamConvAccess :: HasCallStack => UserId -> TeamId -> [UserId] -> Maybe Text -> Maybe (Set Access) -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> Maybe RoleName -> TestM ConvId createTeamConvAccess u tid us name acc role mtimer convRole = do r <- createTeamConvAccessRaw u tid us name acc role mtimer convRole TeamId -> [UserId] -> Maybe Text -> Maybe (Set Access) -> Maybe AccessRole -> Maybe Milliseconds -> Maybe RoleName -> TestM ResponseLBS +createTeamConvAccessRaw :: UserId -> TeamId -> [UserId] -> Maybe Text -> Maybe (Set Access) -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> Maybe RoleName -> TestM ResponseLBS createTeamConvAccessRaw u tid us name acc role mtimer convRole = do g <- view tsGalley let tinfo = ConvTeamInfo tid False @@ -547,7 +547,7 @@ createOne2OneTeamConv u1 u2 n tid = do NewConv [u2] [] n mempty Nothing (Just $ ConvTeamInfo tid False) Nothing Nothing roleNameWireAdmin post $ g . path "/conversations/one2one" . zUser u1 . zConn "conn" . zType "access" . json conv -postConv :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe AccessRole -> Maybe Milliseconds -> TestM ResponseLBS +postConv :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> TestM ResponseLBS postConv u us name a r mtimer = postConvWithRole u us name a r mtimer roleNameWireAdmin defNewConv :: NewConv @@ -583,7 +583,7 @@ postConvWithRemoteUsers u n = setName Nothing = Just "federated gossip" setName x = x -postTeamConv :: TeamId -> UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe AccessRole -> Maybe Milliseconds -> TestM ResponseLBS +postTeamConv :: TeamId -> UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> TestM ResponseLBS postTeamConv tid u us name a r mtimer = do g <- view tsGalley let conv = NewConvUnmanaged $ NewConv us [] name (Set.fromList a) r (Just (ConvTeamInfo tid False)) mtimer Nothing roleNameWireAdmin @@ -599,7 +599,7 @@ deleteTeamConv tid convId zusr = do . zConn "conn" ) -postConvWithRole :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe AccessRole -> Maybe Milliseconds -> RoleName -> TestM ResponseLBS +postConvWithRole :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> RoleName -> TestM ResponseLBS postConvWithRole u members name access arole timer role = postConvQualified u @@ -607,12 +607,12 @@ postConvWithRole u members name access arole timer role = { newConvUsers = members, newConvName = name, newConvAccess = Set.fromList access, - newConvAccessRole = arole, + newConvAccessRoles = arole, newConvMessageTimer = timer, newConvUsersRole = role } -postConvWithReceipt :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe AccessRole -> Maybe Milliseconds -> ReceiptMode -> TestM ResponseLBS +postConvWithReceipt :: UserId -> [UserId] -> Maybe Text -> [Access] -> Maybe (Set AccessRoleV2) -> Maybe Milliseconds -> ReceiptMode -> TestM ResponseLBS postConvWithReceipt u us name a r mtimer rcpt = do g <- view tsGalley let conv = NewConvUnmanaged $ NewConv us [] name (Set.fromList a) r Nothing mtimer (Just rcpt) roleNameWireAdmin @@ -1255,7 +1255,7 @@ registerRemoteConv convId originUser name othMembers = do rcCnvId = qUnqualified convId, rcCnvType = RegularConv, rcCnvAccess = [], - rcCnvAccessRole = ActivatedAccessRole, + rcCnvAccessRoles = Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole], rcCnvName = name, rcNonCreatorMembers = othMembers, rcMessageTimer = Nothing, @@ -2047,7 +2047,7 @@ mkConv cnvId creator selfRole otherMembers = RegularConv creator [] - ActivatedAccessRole + (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole]) (Just "federated gossip") Nothing Nothing diff --git a/services/galley/test/integration/API/Util/TeamFeature.hs b/services/galley/test/integration/API/Util/TeamFeature.hs index 401ea5e4743..4de371dcf96 100644 --- a/services/galley/test/integration/API/Util/TeamFeature.hs +++ b/services/galley/test/integration/API/Util/TeamFeature.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/Main.hs b/services/galley/test/integration/Main.hs index 50d690b39ff..6b810c0ebe2 100644 --- a/services/galley/test/integration/Main.hs +++ b/services/galley/test/integration/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/TestHelpers.hs b/services/galley/test/integration/TestHelpers.hs index 726b548367c..01b9c576957 100644 --- a/services/galley/test/integration/TestHelpers.hs +++ b/services/galley/test/integration/TestHelpers.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/integration/TestSetup.hs b/services/galley/test/integration/TestSetup.hs index 767c0ed2935..08c6ba82e36 100644 --- a/services/galley/test/integration/TestSetup.hs +++ b/services/galley/test/integration/TestSetup.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Main.hs b/services/galley/test/unit/Main.hs index bfd608d4db7..322f87127cf 100644 --- a/services/galley/test/unit/Main.hs +++ b/services/galley/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Test/Galley/API.hs b/services/galley/test/unit/Test/Galley/API.hs index 030ae0e87e6..2523aaa9f2a 100644 --- a/services/galley/test/unit/Test/Galley/API.hs +++ b/services/galley/test/unit/Test/Galley/API.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Test/Galley/API/Message.hs b/services/galley/test/unit/Test/Galley/API/Message.hs index 9815c96aacb..f5aec8a2304 100644 --- a/services/galley/test/unit/Test/Galley/API/Message.hs +++ b/services/galley/test/unit/Test/Galley/API/Message.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Test/Galley/API/One2One.hs b/services/galley/test/unit/Test/Galley/API/One2One.hs index 913a0ed8390..7facb0c5241 100644 --- a/services/galley/test/unit/Test/Galley/API/One2One.hs +++ b/services/galley/test/unit/Test/Galley/API/One2One.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2021 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Test/Galley/Intra/User.hs b/services/galley/test/unit/Test/Galley/Intra/User.hs index 703ed1283e9..96d845dc0d6 100644 --- a/services/galley/test/unit/Test/Galley/Intra/User.hs +++ b/services/galley/test/unit/Test/Galley/Intra/User.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/test/unit/Test/Galley/Mapping.hs b/services/galley/test/unit/Test/Galley/Mapping.hs index d4d833b1703..7da112f4762 100644 --- a/services/galley/test/unit/Test/Galley/Mapping.hs +++ b/services/galley/test/unit/Test/Galley/Mapping.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -24,6 +24,7 @@ import Data.Containers.ListUtils (nubOrdOn) import Data.Domain import Data.Id import Data.Qualified +import qualified Data.Set as Set import Galley.API.Mapping import qualified Galley.Data.Conversation as Data import Galley.Types.Conversations.Members @@ -121,7 +122,7 @@ genConversation = <*> arbitrary <*> arbitrary <*> pure [] - <*> pure ActivatedAccessRole + <*> pure (Set.fromList [TeamMemberAccessRole, NonTeamMemberAccessRole]) <*> listOf genLocalMember <*> listOf genRemoteMember <*> pure Nothing diff --git a/services/galley/test/unit/Test/Galley/Roundtrip.hs b/services/galley/test/unit/Test/Galley/Roundtrip.hs index 66ccac36f75..3da17edeb67 100644 --- a/services/galley/test/unit/Test/Galley/Roundtrip.hs +++ b/services/galley/test/unit/Test/Galley/Roundtrip.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/Main.hs b/services/gundeck/schema/src/Main.hs index 07d2cead159..86d75348e8a 100644 --- a/services/gundeck/schema/src/Main.hs +++ b/services/gundeck/schema/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V1.hs b/services/gundeck/schema/src/V1.hs index 0cc62c1966e..ae1a296ab99 100644 --- a/services/gundeck/schema/src/V1.hs +++ b/services/gundeck/schema/src/V1.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V2.hs b/services/gundeck/schema/src/V2.hs index 4ce81a34063..a970bc2a2d8 100644 --- a/services/gundeck/schema/src/V2.hs +++ b/services/gundeck/schema/src/V2.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V3.hs b/services/gundeck/schema/src/V3.hs index 92755a49d1c..fb6055f8f49 100644 --- a/services/gundeck/schema/src/V3.hs +++ b/services/gundeck/schema/src/V3.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V4.hs b/services/gundeck/schema/src/V4.hs index d3b53c9e843..e9f39f51b7d 100644 --- a/services/gundeck/schema/src/V4.hs +++ b/services/gundeck/schema/src/V4.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V5.hs b/services/gundeck/schema/src/V5.hs index ea579c9e7b8..77e7907ea57 100644 --- a/services/gundeck/schema/src/V5.hs +++ b/services/gundeck/schema/src/V5.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V6.hs b/services/gundeck/schema/src/V6.hs index 9b131d47413..d9b7ae9518d 100644 --- a/services/gundeck/schema/src/V6.hs +++ b/services/gundeck/schema/src/V6.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V7.hs b/services/gundeck/schema/src/V7.hs index afba26ed766..a5c1ac1ea90 100644 --- a/services/gundeck/schema/src/V7.hs +++ b/services/gundeck/schema/src/V7.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/schema/src/V8.hs b/services/gundeck/schema/src/V8.hs index ae486e92836..50812186be3 100644 --- a/services/gundeck/schema/src/V8.hs +++ b/services/gundeck/schema/src/V8.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/API.hs b/services/gundeck/src/Gundeck/API.hs index 8dac8ffa70d..7db416c3258 100644 --- a/services/gundeck/src/Gundeck/API.hs +++ b/services/gundeck/src/Gundeck/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/API/Error.hs b/services/gundeck/src/Gundeck/API/Error.hs index e6c5d9f657f..f3d1631350b 100644 --- a/services/gundeck/src/Gundeck/API/Error.hs +++ b/services/gundeck/src/Gundeck/API/Error.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/API/Internal.hs b/services/gundeck/src/Gundeck/API/Internal.hs index 189aab99298..554890aa480 100644 --- a/services/gundeck/src/Gundeck/API/Internal.hs +++ b/services/gundeck/src/Gundeck/API/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -20,7 +20,7 @@ module Gundeck.API.Internal ) where -import qualified Cassandra as Cassandra +import qualified Cassandra import Control.Lens (view) import Data.Id import qualified Gundeck.Client as Client diff --git a/services/gundeck/src/Gundeck/API/Public.hs b/services/gundeck/src/Gundeck/API/Public.hs index 49741400e27..8a0e2cfbdbd 100644 --- a/services/gundeck/src/Gundeck/API/Public.hs +++ b/services/gundeck/src/Gundeck/API/Public.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Aws.hs b/services/gundeck/src/Gundeck/Aws.hs index 75bc30c1953..bf2967791fe 100644 --- a/services/gundeck/src/Gundeck/Aws.hs +++ b/services/gundeck/src/Gundeck/Aws.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Aws/Arn.hs b/services/gundeck/src/Gundeck/Aws/Arn.hs index ec9927f4b01..cbe3e443751 100644 --- a/services/gundeck/src/Gundeck/Aws/Arn.hs +++ b/services/gundeck/src/Gundeck/Aws/Arn.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -158,8 +158,8 @@ endpointTopicParser = do transportParser :: Parser Transport transportParser = - string "GCM" *> pure GCM - <|> string "APNS_VOIP_SANDBOX" *> pure APNSVoIPSandbox - <|> string "APNS_VOIP" *> pure APNSVoIP - <|> string "APNS_SANDBOX" *> pure APNSSandbox - <|> string "APNS" *> pure APNS + string "GCM" $> GCM + <|> string "APNS_VOIP_SANDBOX" $> APNSVoIPSandbox + <|> string "APNS_VOIP" $> APNSVoIP + <|> string "APNS_SANDBOX" $> APNSSandbox + <|> string "APNS" $> APNS diff --git a/services/gundeck/src/Gundeck/Aws/Sns.hs b/services/gundeck/src/Gundeck/Aws/Sns.hs index 187fb793734..7cc47428045 100644 --- a/services/gundeck/src/Gundeck/Aws/Sns.hs +++ b/services/gundeck/src/Gundeck/Aws/Sns.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Client.hs b/services/gundeck/src/Gundeck/Client.hs index d8448dbd875..d9c1541dacb 100644 --- a/services/gundeck/src/Gundeck/Client.hs +++ b/services/gundeck/src/Gundeck/Client.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Env.hs b/services/gundeck/src/Gundeck/Env.hs index 1a0c7d42985..cd1fb248eb9 100644 --- a/services/gundeck/src/Gundeck/Env.hs +++ b/services/gundeck/src/Gundeck/Env.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -68,7 +68,7 @@ createEnv m o = do n <- newManager tlsManagerSettings - { managerConnCount = (o ^. optSettings . setHttpPoolSize), + { managerConnCount = o ^. optSettings . setHttpPoolSize, managerIdleConnectionCount = 3 * (o ^. optSettings . setHttpPoolSize), managerResponseTimeout = responseTimeoutMicro 5000000 } diff --git a/services/gundeck/src/Gundeck/Instances.hs b/services/gundeck/src/Gundeck/Instances.hs index b96d011c2ed..62973bdee88 100644 --- a/services/gundeck/src/Gundeck/Instances.hs +++ b/services/gundeck/src/Gundeck/Instances.hs @@ -1,10 +1,9 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Monad.hs b/services/gundeck/src/Gundeck/Monad.hs index 4bea200a2ec..aa89400438e 100644 --- a/services/gundeck/src/Gundeck/Monad.hs +++ b/services/gundeck/src/Gundeck/Monad.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Notification.hs b/services/gundeck/src/Gundeck/Notification.hs index 55bab330d7f..c542cb0326f 100644 --- a/services/gundeck/src/Gundeck/Notification.hs +++ b/services/gundeck/src/Gundeck/Notification.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Notification/Data.hs b/services/gundeck/src/Gundeck/Notification/Data.hs index 36becc262bf..e6d25792e4a 100644 --- a/services/gundeck/src/Gundeck/Notification/Data.hs +++ b/services/gundeck/src/Gundeck/Notification/Data.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Options.hs b/services/gundeck/src/Gundeck/Options.hs index 965d542e073..1ea30c1c36e 100644 --- a/services/gundeck/src/Gundeck/Options.hs +++ b/services/gundeck/src/Gundeck/Options.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Presence.hs b/services/gundeck/src/Gundeck/Presence.hs index 3c14fbfdcd0..5abd2a942e0 100644 --- a/services/gundeck/src/Gundeck/Presence.hs +++ b/services/gundeck/src/Gundeck/Presence.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Presence/Data.hs b/services/gundeck/src/Gundeck/Presence/Data.hs index ab0e8956b7e..47b9fcec833 100644 --- a/services/gundeck/src/Gundeck/Presence/Data.hs +++ b/services/gundeck/src/Gundeck/Presence/Data.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push.hs b/services/gundeck/src/Gundeck/Push.hs index cd205b536f1..5dc9fd44185 100644 --- a/services/gundeck/src/Gundeck/Push.hs +++ b/services/gundeck/src/Gundeck/Push.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push/Data.hs b/services/gundeck/src/Gundeck/Push/Data.hs index ed07d7837b6..af690e160b3 100644 --- a/services/gundeck/src/Gundeck/Push/Data.hs +++ b/services/gundeck/src/Gundeck/Push/Data.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push/Native.hs b/services/gundeck/src/Gundeck/Push/Native.hs index 3be51cae8d7..d0baae81b5b 100644 --- a/services/gundeck/src/Gundeck/Push/Native.hs +++ b/services/gundeck/src/Gundeck/Push/Native.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push/Native/Serialise.hs b/services/gundeck/src/Gundeck/Push/Native/Serialise.hs index bc4bca11cc3..75cd3fa08f8 100644 --- a/services/gundeck/src/Gundeck/Push/Native/Serialise.hs +++ b/services/gundeck/src/Gundeck/Push/Native/Serialise.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push/Native/Types.hs b/services/gundeck/src/Gundeck/Push/Native/Types.hs index e007bbe2fec..cb61700eb34 100644 --- a/services/gundeck/src/Gundeck/Push/Native/Types.hs +++ b/services/gundeck/src/Gundeck/Push/Native/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Push/Websocket.hs b/services/gundeck/src/Gundeck/Push/Websocket.hs index cf444eb5ceb..86671d0a0c8 100644 --- a/services/gundeck/src/Gundeck/Push/Websocket.hs +++ b/services/gundeck/src/Gundeck/Push/Websocket.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -173,12 +173,11 @@ bulkSend' :: m BulkPushResponse bulkSend' uri (encode -> jsbody) = do req <- - ( check - . method POST - . contentJson - . lbytes jsbody - . timeout 3000 -- ms - ) + check + . method POST + . contentJson + . lbytes jsbody + . timeout 3000 -- ms <$> Http.setUri empty (fromURI uri) try (submit req) >>= \case Left e -> throwM (e :: SomeException) diff --git a/services/gundeck/src/Gundeck/React.hs b/services/gundeck/src/Gundeck/React.hs index b5340440c38..e7e7b6ed257 100644 --- a/services/gundeck/src/Gundeck/React.hs +++ b/services/gundeck/src/Gundeck/React.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Run.hs b/services/gundeck/src/Gundeck/Run.hs index cb41730a161..02251b6d3fb 100644 --- a/services/gundeck/src/Gundeck/Run.hs +++ b/services/gundeck/src/Gundeck/Run.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/ThreadBudget.hs b/services/gundeck/src/Gundeck/ThreadBudget.hs index 099d3f2ef2f..f226dc379c2 100644 --- a/services/gundeck/src/Gundeck/ThreadBudget.hs +++ b/services/gundeck/src/Gundeck/ThreadBudget.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/ThreadBudget/Internal.hs b/services/gundeck/src/Gundeck/ThreadBudget/Internal.hs index 4ce346495a8..7c8c59aeee3 100644 --- a/services/gundeck/src/Gundeck/ThreadBudget/Internal.hs +++ b/services/gundeck/src/Gundeck/ThreadBudget/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -134,18 +134,18 @@ runWithBudget' metrics (ThreadBudgetState limits ref) spent fallback action = do let softLimitBreached = maybe False (oldsize >=) (limits ^. limitSoft) hardLimitBreached = maybe False (oldsize >=) (limits ^. limitHard) warnNoBudget softLimitBreached hardLimitBreached oldsize - if (maybe True (oldsize <) (limits ^. limitHard)) + if maybe True (oldsize <) (limits ^. limitHard) then go key oldsize else pure fallback where go :: UUID -> Int -> m a go key oldsize = do LC.debug $ - "key" LC..= (toText key) + "key" LC..= toText key LC.~~ "spent" LC..= oldsize LC.~~ LC.msg (LC.val "runWithBudget: go") handle <- async action - _ <- register ref key (const () <$> handle) + _ <- register ref key (void handle) wait handle -- iff soft and/or hard limit are breached, log a warning-level message. warnNoBudget :: Bool -> Bool -> Int -> m () diff --git a/services/gundeck/src/Gundeck/Util.hs b/services/gundeck/src/Gundeck/Util.hs index 7ebb157a6bf..d2a3499f8c8 100644 --- a/services/gundeck/src/Gundeck/Util.hs +++ b/services/gundeck/src/Gundeck/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Util/DelayQueue.hs b/services/gundeck/src/Gundeck/Util/DelayQueue.hs index 80130fe4580..453fe22622b 100644 --- a/services/gundeck/src/Gundeck/Util/DelayQueue.hs +++ b/services/gundeck/src/Gundeck/Util/DelayQueue.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/src/Gundeck/Util/Redis.hs b/services/gundeck/src/Gundeck/Util/Redis.hs index acfbf4667e8..781b5d59bd6 100644 --- a/services/gundeck/src/Gundeck/Util/Redis.hs +++ b/services/gundeck/src/Gundeck/Util/Redis.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -39,8 +39,7 @@ handlers = _ -> pure False, const . Handler $ \(_ :: ConnectionError) -> pure True, const . Handler $ \(_ :: Timeout) -> pure True, - const . Handler $ \e -> - case e of - TransactionAborted -> pure True - _ -> pure False + const . Handler $ \case + TransactionAborted -> pure True + _ -> pure False ] diff --git a/services/gundeck/src/Main.hs b/services/gundeck/src/Main.hs index 3a4dda47f3d..08396fe8bcb 100644 --- a/services/gundeck/src/Main.hs +++ b/services/gundeck/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/bench/Main.hs b/services/gundeck/test/bench/Main.hs index ca692ee969b..0a996245937 100644 --- a/services/gundeck/test/bench/Main.hs +++ b/services/gundeck/test/bench/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -37,7 +37,7 @@ import System.Random (randomRIO) main :: IO () main = withOpenSSL $ do - prepared <- prepareBudgetState (100000) + prepared <- prepareBudgetState 100000 defaultMain [ bgroup "notice" diff --git a/services/gundeck/test/integration/API.hs b/services/gundeck/test/integration/API.hs index 0a1b2c55ef0..32e509661b7 100644 --- a/services/gundeck/test/integration/API.hs +++ b/services/gundeck/test/integration/API.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -71,54 +71,54 @@ tests s = "API tests" [ testGroup "Push" - [ test s "Register a user" $ addUser, - test s "Delete a user" $ removeUser, - test s "Replace presence" $ replacePresence, - test s "Remove stale presence" $ removeStalePresence, - test s "Single user push" $ singleUserPush, + [ test s "Register a user" addUser, + test s "Delete a user" removeUser, + test s "Replace presence" replacePresence, + test s "Remove stale presence" removeStalePresence, + test s "Single user push" singleUserPush, test s "Push many to Cannon via bulkpush (via gundeck; group notif)" $ bulkPush False 50 8, test s "Push many to Cannon via bulkpush (via gundeck; e2e notif)" $ bulkPush True 50 8, - test s "Send a push, ensure origin does not receive it" $ sendSingleUserNoPiggyback, - test s "Targeted push by connection" $ targetConnectionPush, - test s "Targeted push by client" $ targetClientPush + test s "Send a push, ensure origin does not receive it" sendSingleUserNoPiggyback, + test s "Targeted push by connection" targetConnectionPush, + test s "Targeted push by client" targetClientPush ], testGroup "Notifications" - [ test s "No notifications" $ testNoNotifs, - test s "Fetch all notifications" $ testFetchAllNotifs, - test s "Fetch new notifications" $ testFetchNewNotifs, - test s "No new notifications" $ testNoNewNotifs, - test s "Missing notifications" $ testMissingNotifs, - test s "Fetch last notification" $ testFetchLastNotif, - test s "No last notification" $ testNoLastNotif, - test s "Bad 'since' parameter" $ testFetchNotifBadSince, - test s "Fetch notification by ID" $ testFetchNotifById, - test s "Filter notifications by client" $ testFilterNotifByClient, - test s "Paging" $ testNotificationPaging + [ test s "No notifications" testNoNotifs, + test s "Fetch all notifications" testFetchAllNotifs, + test s "Fetch new notifications" testFetchNewNotifs, + test s "No new notifications" testNoNewNotifs, + test s "Missing notifications" testMissingNotifs, + test s "Fetch last notification" testFetchLastNotif, + test s "No last notification" testNoLastNotif, + test s "Bad 'since' parameter" testFetchNotifBadSince, + test s "Fetch notification by ID" testFetchNotifById, + test s "Filter notifications by client" testFilterNotifByClient, + test s "Paging" testNotificationPaging ], testGroup "Clients" - [ test s "unregister a client" $ testUnregisterClient + [ test s "unregister a client" testUnregisterClient ], testGroup "Tokens" - [ test s "register a push token" $ testRegisterPushToken, - test s "unregister a push token" $ testUnregisterPushToken + [ test s "register a push token" testRegisterPushToken, + test s "unregister a push token" testUnregisterPushToken ], testGroup "Websocket pingpong" - [ test s "pings produce pongs" $ testPingPong, - test s "non-pings are ignored" $ testNoPingNoPong + [ test s "pings produce pongs" testPingPong, + test s "non-pings are ignored" testNoPingNoPong ], -- TODO: The following tests require (at the moment), the usage real AWS -- services so they are kept in a separate group to simplify testing testGroup "RealAWS" - [ test s "Send a push to online and offline users" $ sendMultipleUsers, - test s "register too many push tokens" $ testRegisterTooManyTokens, - test s "share push token" $ testSharePushToken, - test s "replace shared push token" $ testReplaceSharedPushToken, - test s "fail on long push token" $ testLongPushToken + [ test s "Send a push to online and offline users" sendMultipleUsers, + test s "register too many push tokens" testRegisterTooManyTokens, + test s "share push token" testSharePushToken, + test s "replace shared push token" testReplaceSharedPushToken, + test s "fail on long push token" testLongPushToken ] ] @@ -221,7 +221,7 @@ bulkPush isE2E numUsers numConnsPerUser = do ca <- view tsCannon ca2 <- view tsCannon uids@(uid : _) :: [UserId] <- replicateM numUsers randomId - (connids@((_ : _) : _)) :: [[ConnId]] <- replicateM numUsers $ replicateM numConnsPerUser randomConnId + connids@((_ : _) : _) :: [[ConnId]] <- replicateM numUsers $ replicateM numConnsPerUser randomConnId let ucs :: [(UserId, [ConnId])] = zip uids connids ucs' :: [(UserId, [(ConnId, Bool)])] = toggle (mconcat $ repeat [True, False]) ucs chs <- do @@ -696,7 +696,7 @@ testRegisterPushToken = do c1 <- randomClientId t11 <- randomToken c1 apnsToken t11' <- randomToken c1 apnsToken -- overlaps - t12 <- randomToken c1 apnsToken {tName = (AppName "com.wire.ent")} -- different app + t12 <- randomToken c1 apnsToken {tName = AppName "com.wire.ent"} -- different app t13 <- randomToken c1 gcmToken -- different transport -- Client 2 with 1 token diff --git a/services/gundeck/test/integration/Main.hs b/services/gundeck/test/integration/Main.hs index a24fde8dc84..a14ea2a1d68 100644 --- a/services/gundeck/test/integration/Main.hs +++ b/services/gundeck/test/integration/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -65,8 +65,8 @@ instance IsOption ServiceConfigFile where optionName = return "service-config" optionHelp = return "Service config file to read from" optionCLParser = - fmap ServiceConfigFile $ - strOption $ + ServiceConfigFile + <$> strOption ( short (untag (return 's' :: Tagged ServiceConfigFile Char)) <> long (untag (optionName :: Tagged ServiceConfigFile String)) <> help (untag (optionHelp :: Tagged ServiceConfigFile String)) diff --git a/services/gundeck/test/integration/Metrics.hs b/services/gundeck/test/integration/Metrics.hs index 63324a0369a..558df8a5d56 100644 --- a/services/gundeck/test/integration/Metrics.hs +++ b/services/gundeck/test/integration/Metrics.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/integration/TestSetup.hs b/services/gundeck/test/integration/TestSetup.hs index 2d31de313a7..08ecd14c09b 100644 --- a/services/gundeck/test/integration/TestSetup.hs +++ b/services/gundeck/test/integration/TestSetup.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/unit/DelayQueue.hs b/services/gundeck/test/unit/DelayQueue.hs index 939ad8bb577..383a9c2640b 100644 --- a/services/gundeck/test/unit/DelayQueue.hs +++ b/services/gundeck/test/unit/DelayQueue.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/unit/Json.hs b/services/gundeck/test/unit/Json.hs index ed1528500c2..253c2d2aa68 100644 --- a/services/gundeck/test/unit/Json.hs +++ b/services/gundeck/test/unit/Json.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -44,7 +44,7 @@ tests = assertEqual "" (decode serialized) (Just typed), testCase "BulkPushRequest example" $ do let serialized = "{\"bulkpush_req\":[{\"notification\":{\"payload\":[{\"Rk\":\"o\"},{\"n\":\"uy\"}],\"transient\":true,\"id\":\"d8f6c42e-f8da-4e7b-99e7-db66eccf8da1\"},\"targets\":[{\"conn_id\":\"88\",\"user_id\":\"7d94d3f0-f853-41d3-bd25-eb17c8f72f6e\"},{\"conn_id\":\"v\",\"user_id\":\"10158f18-3350-41c5-9eb4-374dee978e05\"}]},{\"notification\":{\"payload\":[{}],\"transient\":false,\"id\":\"8d3111d1-d010-47e6-b5db-d81cfbe8b0d4\"},\"targets\":[{\"conn_id\":\"nJ\",\"user_id\":\"09178cd7-3190-45ec-95aa-695edbb03960\"}]}]}" - typed = Just (BulkPushRequest {fromBulkPushRequest = [(Notification {ntfId = (read "d8f6c42e-f8da-4e7b-99e7-db66eccf8da1"), ntfTransient = True, ntfPayload = list1 (fromList [("Rk", String "o")]) [fromList [("n", String "uy")]]}, [PushTarget {ptUserId = read "7d94d3f0-f853-41d3-bd25-eb17c8f72f6e", ptConnId = ConnId {fromConnId = "88"}}, PushTarget {ptUserId = read "10158f18-3350-41c5-9eb4-374dee978e05", ptConnId = ConnId {fromConnId = "v"}}]), (Notification {ntfId = read "8d3111d1-d010-47e6-b5db-d81cfbe8b0d4", ntfTransient = False, ntfPayload = list1 (fromList []) []}, [PushTarget {ptUserId = read "09178cd7-3190-45ec-95aa-695edbb03960", ptConnId = ConnId {fromConnId = "nJ"}}])]}) + typed = Just (BulkPushRequest {fromBulkPushRequest = [(Notification {ntfId = read "d8f6c42e-f8da-4e7b-99e7-db66eccf8da1", ntfTransient = True, ntfPayload = list1 (fromList [("Rk", String "o")]) [fromList [("n", String "uy")]]}, [PushTarget {ptUserId = read "7d94d3f0-f853-41d3-bd25-eb17c8f72f6e", ptConnId = ConnId {fromConnId = "88"}}, PushTarget {ptUserId = read "10158f18-3350-41c5-9eb4-374dee978e05", ptConnId = ConnId {fromConnId = "v"}}]), (Notification {ntfId = read "8d3111d1-d010-47e6-b5db-d81cfbe8b0d4", ntfTransient = False, ntfPayload = list1 (fromList []) []}, [PushTarget {ptUserId = read "09178cd7-3190-45ec-95aa-695edbb03960", ptConnId = ConnId {fromConnId = "nJ"}}])]}) assertEqual "" (decode serialized) (Just typed), testCase "BulkPushResponse example" $ do let serialized = "{\"bulkpush_resp\":[{\"status\":\"push_status_gone\",\"notif_id\":\"f2c218cf-6399-47fb-8d7b-726ed599af91\",\"target\":{\"conn_id\":\"\",\"user_id\":\"5b099991-364a-425d-91af-9b8e51ac2956\"}},{\"status\":\"push_status_ok\",\"notif_id\":\"d8e8d19a-6788-4180-afcd-bf84395f4cf6\",\"target\":{\"conn_id\":\"Lf\",\"user_id\":\"cccc316f-eaad-4d55-9798-3fd8b431106e\"}}]}" diff --git a/services/gundeck/test/unit/Main.hs b/services/gundeck/test/unit/Main.hs index 20b372afcda..fae554dc0f6 100644 --- a/services/gundeck/test/unit/Main.hs +++ b/services/gundeck/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/unit/MockGundeck.hs b/services/gundeck/test/unit/MockGundeck.hs index 73a9608620c..67f2b22eecf 100644 --- a/services/gundeck/test/unit/MockGundeck.hs +++ b/services/gundeck/test/unit/MockGundeck.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -143,7 +143,7 @@ instance ToJSON Address where "transport" Aeson..= (adr ^. addrTransport), "app" Aeson..= (adr ^. addrApp), "token" Aeson..= (adr ^. addrToken), - "endpoint" Aeson..= (serializeFakeAddrEndpoint $ adr ^. addrEndpoint), + "endpoint" Aeson..= serializeFakeAddrEndpoint (adr ^. addrEndpoint), "conn" Aeson..= (adr ^. addrConn), "client" Aeson..= (adr ^. addrClient) ] @@ -326,7 +326,7 @@ genPush env = do -- from the list of all recipient connections, sometimes add some here. oneof [ pure mempty, - fmap Set.fromList $ QC.sublistOf allConnIds + Set.fromList <$> QC.sublistOf allConnIds ] originConnection <- do -- if one of the recipients is the sender, we may 'Just' pick one of the devices of that @@ -588,7 +588,7 @@ mockStreamAdd :: NotificationTTL -> m () mockStreamAdd _ (toList -> targets) pay _ = - forM_ targets $ \tgt -> case (tgt ^. targetClients) of + forM_ targets $ \tgt -> case tgt ^. targetClients of clients@(_ : _) -> forM_ clients $ \cid -> msCassQueue %= deliver (tgt ^. targetUser, cid) pay [] -> @@ -707,7 +707,7 @@ unsafeList1 [] = error "unsafeList1: empty list" unsafeList1 (x : xs) = list1 x xs deliver :: (UserId, ClientId) -> Payload -> NotifQueue -> NotifQueue -deliver qkey qval queue = Map.alter (Just . tweak) qkey queue +deliver qkey qval = Map.alter (Just . tweak) qkey where tweak Nothing = MSet.singleton (payloadToInt qval) tweak (Just qvals) = MSet.insert (payloadToInt qval) qvals diff --git a/services/gundeck/test/unit/Native.hs b/services/gundeck/test/unit/Native.hs index 1f3f8984c42..4e35710baac 100644 --- a/services/gundeck/test/unit/Native.hs +++ b/services/gundeck/test/unit/Native.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/gundeck/test/unit/Push.hs b/services/gundeck/test/unit/Push.hs index b093718517b..5c713514bbf 100644 --- a/services/gundeck/test/unit/Push.hs +++ b/services/gundeck/test/unit/Push.hs @@ -1,10 +1,9 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE DisambiguateRecordFields #-} {-# OPTIONS_GHC -Wno-incomplete-patterns #-} -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -34,7 +33,8 @@ import Test.Tasty.QuickCheck tests :: TestTree tests = - testGroup "bulkpush" $ + testGroup + "bulkpush" [ testProperty "web sockets" webBulkPushProps, testProperty "native pushes" pushAllProps ] diff --git a/services/gundeck/test/unit/ThreadBudget.hs b/services/gundeck/test/unit/ThreadBudget.hs index b730e43d5b5..fe164a69d2e 100644 --- a/services/gundeck/test/unit/ThreadBudget.hs +++ b/services/gundeck/test/unit/ThreadBudget.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -141,7 +141,8 @@ mkWatcher tbs logHistory = do tests :: TestTree tests = - testGroup "thread budgets" $ + testGroup + "thread budgets" [ -- flaky test case as described in https://wearezeta.atlassian.net/browse/BE-527 -- testCase "unit test" testThreadBudgets, testProperty "qc stm (sequential)" propSequential diff --git a/services/proxy/src/Main.hs b/services/proxy/src/Main.hs index 01bcbb7a5fa..063a73095ba 100644 --- a/services/proxy/src/Main.hs +++ b/services/proxy/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/API.hs b/services/proxy/src/Proxy/API.hs index 2b8d63d26f7..15bc7de4ba2 100644 --- a/services/proxy/src/Proxy/API.hs +++ b/services/proxy/src/Proxy/API.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/API/Public.hs b/services/proxy/src/Proxy/API/Public.hs index 1af67b77152..83459497bfc 100644 --- a/services/proxy/src/Proxy/API/Public.hs +++ b/services/proxy/src/Proxy/API/Public.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/Env.hs b/services/proxy/src/Proxy/Env.hs index 1befea351c6..3da004bf26e 100644 --- a/services/proxy/src/Proxy/Env.hs +++ b/services/proxy/src/Proxy/Env.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/Options.hs b/services/proxy/src/Proxy/Options.hs index 3bdb39e36f3..e6fe0dfbef7 100644 --- a/services/proxy/src/Proxy/Options.hs +++ b/services/proxy/src/Proxy/Options.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/Proxy.hs b/services/proxy/src/Proxy/Proxy.hs index a7bb6fdd3de..0377ad08320 100644 --- a/services/proxy/src/Proxy/Proxy.hs +++ b/services/proxy/src/Proxy/Proxy.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/src/Proxy/Run.hs b/services/proxy/src/Proxy/Run.hs index 0492ba680ba..7bd39b4fcc1 100644 --- a/services/proxy/src/Proxy/Run.hs +++ b/services/proxy/src/Proxy/Run.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/proxy/test/unit/Main.hs b/services/proxy/test/unit/Main.hs index ecfe622f3ce..4a2a60d42b2 100644 --- a/services/proxy/test/unit/Main.hs +++ b/services/proxy/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/exec/Main.hs b/services/spar/exec/Main.hs index 9347ff758c6..8eb5cf9a42d 100644 --- a/services/spar/exec/Main.hs +++ b/services/spar/exec/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Main.hs b/services/spar/migrate-data/src/Main.hs index 9d31fcfb8c1..3c0dde7b782 100644 --- a/services/spar/migrate-data/src/Main.hs +++ b/services/spar/migrate-data/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/Options.hs b/services/spar/migrate-data/src/Spar/DataMigration/Options.hs index 6d8b596f8bc..fdb70667eb6 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/Options.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/Options.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/RIO.hs b/services/spar/migrate-data/src/Spar/DataMigration/RIO.hs index 5e57556c78a..3db5aa9aa7c 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/RIO.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/RIO.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/Run.hs b/services/spar/migrate-data/src/Spar/DataMigration/Run.hs index 0820d04fbc3..f1be2836d49 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/Run.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/Run.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/Types.hs b/services/spar/migrate-data/src/Spar/DataMigration/Types.hs index 1e2f15de20c..daa5d2a86cc 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/Types.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs b/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs index ba6b37cef11..9d3aa101fcd 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/migrate-data/src/Spar/DataMigration/V2_UserV2.hs b/services/spar/migrate-data/src/Spar/DataMigration/V2_UserV2.hs index 083b8ef5f6b..c86470ff32a 100644 --- a/services/spar/migrate-data/src/Spar/DataMigration/V2_UserV2.hs +++ b/services/spar/migrate-data/src/Spar/DataMigration/V2_UserV2.hs @@ -16,6 +16,23 @@ -- with this program. If not, see . {-# OPTIONS_GHC -Wno-unused-top-binds #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.DataMigration.V2_UserV2 (migration) where import Cassandra diff --git a/services/spar/schema/src/Main.hs b/services/spar/schema/src/Main.hs index 4084b5c10a4..c2c2bed19af 100644 --- a/services/spar/schema/src/Main.hs +++ b/services/spar/schema/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V0.hs b/services/spar/schema/src/V0.hs index d035913e150..b537c16ffa0 100644 --- a/services/spar/schema/src/V0.hs +++ b/services/spar/schema/src/V0.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V1.hs b/services/spar/schema/src/V1.hs index 89027340145..d0dab374e17 100644 --- a/services/spar/schema/src/V1.hs +++ b/services/spar/schema/src/V1.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V10.hs b/services/spar/schema/src/V10.hs index 07d0a25b3de..532102f426a 100644 --- a/services/spar/schema/src/V10.hs +++ b/services/spar/schema/src/V10.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V11.hs b/services/spar/schema/src/V11.hs index 18f7a7488c1..8e893da948e 100644 --- a/services/spar/schema/src/V11.hs +++ b/services/spar/schema/src/V11.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V12.hs b/services/spar/schema/src/V12.hs index cda1a374c46..59ef5ed0d12 100644 --- a/services/spar/schema/src/V12.hs +++ b/services/spar/schema/src/V12.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V13.hs b/services/spar/schema/src/V13.hs index 89bf0e90aba..c0f0248221e 100644 --- a/services/spar/schema/src/V13.hs +++ b/services/spar/schema/src/V13.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V14.hs b/services/spar/schema/src/V14.hs index ff94609ad32..322ee66a3e5 100644 --- a/services/spar/schema/src/V14.hs +++ b/services/spar/schema/src/V14.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V15.hs b/services/spar/schema/src/V15.hs index 6ead409623a..c2d7d43e243 100644 --- a/services/spar/schema/src/V15.hs +++ b/services/spar/schema/src/V15.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V2.hs b/services/spar/schema/src/V2.hs index d519c1181fb..5ab0a0525ad 100644 --- a/services/spar/schema/src/V2.hs +++ b/services/spar/schema/src/V2.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V3.hs b/services/spar/schema/src/V3.hs index 4ad8775265c..43507af72cf 100644 --- a/services/spar/schema/src/V3.hs +++ b/services/spar/schema/src/V3.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V4.hs b/services/spar/schema/src/V4.hs index 63eb9d1352e..9760d377c3a 100644 --- a/services/spar/schema/src/V4.hs +++ b/services/spar/schema/src/V4.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V5.hs b/services/spar/schema/src/V5.hs index f0c13410e31..7a635cc5283 100644 --- a/services/spar/schema/src/V5.hs +++ b/services/spar/schema/src/V5.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V6.hs b/services/spar/schema/src/V6.hs index 9e7d6a3662c..71e13821fdc 100644 --- a/services/spar/schema/src/V6.hs +++ b/services/spar/schema/src/V6.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V7.hs b/services/spar/schema/src/V7.hs index 0d7eadeb691..2a28aea17bb 100644 --- a/services/spar/schema/src/V7.hs +++ b/services/spar/schema/src/V7.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V8.hs b/services/spar/schema/src/V8.hs index 409f4a31232..d8b795ccc12 100644 --- a/services/spar/schema/src/V8.hs +++ b/services/spar/schema/src/V8.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/schema/src/V9.hs b/services/spar/schema/src/V9.hs index 5080ed86e80..990d1a15ef2 100644 --- a/services/spar/schema/src/V9.hs +++ b/services/spar/schema/src/V9.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/API.hs b/services/spar/src/Spar/API.hs index 935e386a276..a5759c754d2 100644 --- a/services/spar/src/Spar/API.hs +++ b/services/spar/src/Spar/API.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -61,7 +61,6 @@ import Servant import qualified Servant.Multipart as Multipart import Spar.App import Spar.CanonicalInterpreter -import qualified Spar.Data as Data (GetIdPResult (..), Replaced (..), Replacing (..)) import Spar.Error import qualified Spar.Intra.BrigApp as Brig import Spar.Orphans () @@ -76,6 +75,7 @@ import Spar.Sem.DefaultSsoCode (DefaultSsoCode) import qualified Spar.Sem.DefaultSsoCode as DefaultSsoCode import Spar.Sem.GalleyAccess (GalleyAccess) import qualified Spar.Sem.GalleyAccess as GalleyAccess +import Spar.Sem.IdP (GetIdPResult (..), Replaced (..), Replacing (..)) import qualified Spar.Sem.IdP as IdPEffect import Spar.Sem.IdPRawMetadataStore (IdPRawMetadataStore) import qualified Spar.Sem.IdPRawMetadataStore as IdPRawMetadataStore @@ -473,7 +473,7 @@ idpDelete zusr idpid (fromMaybe False -> purge) = withDebugLog "idpDelete" (cons -- Delete tokens associated with given IdP (we rely on the fact that -- each IdP has exactly one team so we can look up all tokens -- associated with the team and then filter them) - tokens <- ScimTokenStore.getByTeam team + tokens <- ScimTokenStore.lookupByTeam team for_ tokens $ \ScimTokenInfo {..} -> when (stiIdP == Just idpid) $ ScimTokenStore.delete team stiId -- Delete IdP config @@ -494,11 +494,11 @@ idpDelete zusr idpid (fromMaybe False -> purge) = withDebugLog "idpDelete" (cons updateReplacingIdP :: IdP -> Sem r () updateReplacingIdP idp = forM_ (idp ^. SAML.idpExtraInfo . wiOldIssuers) $ \oldIssuer -> do getIdPIdByIssuer oldIssuer (idp ^. SAML.idpExtraInfo . wiTeam) >>= \case - Data.GetIdPFound iid -> IdPEffect.clearReplacedBy $ Data.Replaced iid - Data.GetIdPNotFound -> pure () - Data.GetIdPDanglingId _ -> pure () - Data.GetIdPNonUnique _ -> pure () - Data.GetIdPWrongTeam _ -> pure () + GetIdPFound iid -> IdPEffect.clearReplacedBy $ Replaced iid + GetIdPNotFound -> pure () + GetIdPDanglingId _ -> pure () + GetIdPNonUnique _ -> pure () + GetIdPWrongTeam _ -> pure () -- | This handler only does the json parsing, and leaves all authorization checks and -- application logic to 'idpCreateXML'. @@ -548,7 +548,7 @@ idpCreateXML zusr raw idpmeta mReplaces (fromMaybe defWireIdPAPIVersion -> apive IdPRawMetadataStore.store (idp ^. SAML.idpId) raw storeIdPConfig idp forM_ mReplaces $ \replaces -> do - IdPEffect.setReplacedBy (Data.Replaced replaces) (Data.Replacing (idp ^. SAML.idpId)) + IdPEffect.setReplacedBy (Replaced replaces) (Replacing (idp ^. SAML.idpId)) pure idp -- | In teams with a scim access token, only one IdP is allowed. The reason is that scim user @@ -565,7 +565,7 @@ assertNoScimOrNoIdP :: TeamId -> Sem r () assertNoScimOrNoIdP teamid = do - numTokens <- length <$> ScimTokenStore.getByTeam teamid + numTokens <- length <$> ScimTokenStore.lookupByTeam teamid numIdps <- length <$> IdPEffect.getConfigsByTeam teamid when (numTokens > 0 && numIdps > 0) $ do throwSparSem $ @@ -636,11 +636,11 @@ validateNewIdP apiversion _idpMetadata teamId mReplaces = withDebugLog "validate pure () case idp of - Data.GetIdPFound idp' {- same team -} -> handleIdPClash (Right idp') - Data.GetIdPNotFound -> pure () - res@(Data.GetIdPDanglingId _) -> throwSparSem . SparIdPNotFound . ("validateNewIdP: " <>) . cs . show $ res -- database inconsistency - Data.GetIdPNonUnique ids' {- same team didn't yield anything, but there are at least two other teams with this issuer already -} -> handleIdPClash (Left ids') - Data.GetIdPWrongTeam id' {- different team -} -> handleIdPClash (Left id') + GetIdPFound idp' {- same team -} -> handleIdPClash (Right idp') + GetIdPNotFound -> pure () + res@(GetIdPDanglingId _) -> throwSparSem . SparIdPNotFound . ("validateNewIdP: " <>) . cs . show $ res -- database inconsistency + GetIdPNonUnique ids' {- same team didn't yield anything, but there are at least two other teams with this issuer already -} -> handleIdPClash (Left ids') + GetIdPWrongTeam id' {- different team -} -> handleIdPClash (Left id') pure SAML.IdPConfig {..} @@ -726,11 +726,11 @@ validateIdPUpdate zusr _idpMetadata _idpId = withDebugLog "validateNewIdP" (Just else do foundConfig <- getIdPConfigByIssuerAllowOld newIssuer (Just teamId) notInUseByOthers <- case foundConfig of - Data.GetIdPFound c -> pure $ c ^. SAML.idpId == _idpId - Data.GetIdPNotFound -> pure True - res@(Data.GetIdPDanglingId _) -> throwSparSem . SparIdPNotFound . ("validateIdPUpdate: " <>) . cs . show $ res -- impossible - res@(Data.GetIdPNonUnique _) -> throwSparSem . SparIdPNotFound . ("validateIdPUpdate: " <>) . cs . show $ res -- impossible (because team id was used in lookup) - Data.GetIdPWrongTeam _ -> pure False + GetIdPFound c -> pure $ c ^. SAML.idpId == _idpId + GetIdPNotFound -> pure True + res@(GetIdPDanglingId _) -> throwSparSem . SparIdPNotFound . ("validateIdPUpdate: " <>) . cs . show $ res -- impossible + res@(GetIdPNonUnique _) -> throwSparSem . SparIdPNotFound . ("validateIdPUpdate: " <>) . cs . show $ res -- impossible (because team id was used in lookup) + GetIdPWrongTeam _ -> pure False if notInUseByOthers then pure $ (previousIdP ^. SAML.idpExtraInfo) & wiOldIssuers %~ nub . (previousIssuer :) else throwSparSem SparIdPIssuerInUse diff --git a/services/spar/src/Spar/App.hs b/services/spar/src/Spar/App.hs index eaf2285f599..1c0fdcc4e2b 100644 --- a/services/spar/src/Spar/App.hs +++ b/services/spar/src/Spar/App.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -76,7 +76,6 @@ import qualified SAML2.WebSSO as SAML import qualified SAML2.WebSSO.Types.Email as SAMLEmail import Servant import qualified Servant.Multipart as Multipart -import qualified Spar.Data as Data (GetIdPResult (..)) import Spar.Error hiding (sparToServerErrorWithLogging) import qualified Spar.Intra.BrigApp as Intra import Spar.Orphans () @@ -141,11 +140,11 @@ storeIdPConfig idp = IdPEffect.storeConfig idp getIdPConfigByIssuerOptionalSPId :: Members '[IdPEffect.IdP, Error SparError] r => Issuer -> Maybe TeamId -> Sem r IdP getIdPConfigByIssuerOptionalSPId issuer mbteam = do getIdPConfigByIssuerAllowOld issuer mbteam >>= \case - Data.GetIdPFound idp -> pure idp - Data.GetIdPNotFound -> throwSparSem $ SparIdPNotFound mempty - res@(Data.GetIdPDanglingId _) -> throwSparSem $ SparIdPNotFound (cs $ show res) - res@(Data.GetIdPNonUnique _) -> throwSparSem $ SparIdPNotFound (cs $ show res) - res@(Data.GetIdPWrongTeam _) -> throwSparSem $ SparIdPNotFound (cs $ show res) + GetIdPFound idp -> pure idp + GetIdPNotFound -> throwSparSem $ SparIdPNotFound mempty + res@(GetIdPDanglingId _) -> throwSparSem $ SparIdPNotFound (cs $ show res) + res@(GetIdPNonUnique _) -> throwSparSem $ SparIdPNotFound (cs $ show res) + res@(GetIdPWrongTeam _) -> throwSparSem $ SparIdPNotFound (cs $ show res) insertUser :: Member SAMLUserStore r => SAML.UserRef -> UserId -> Sem r () insertUser uref uid = SAMLUserStore.insert uref uid @@ -295,7 +294,7 @@ autoprovisionSamlUserWithId mbteam buid suid = do guardScimTokens :: IdP -> Sem r () guardScimTokens idp = do let teamid = idp ^. idpExtraInfo . wiTeam - scimtoks <- ScimTokenStore.getByTeam teamid + scimtoks <- ScimTokenStore.lookupByTeam teamid unless (null scimtoks) $ do throwSparSem SparSamlCredentialsNotFound @@ -338,11 +337,11 @@ bindUser buid userref = do err = throwSparSem . SparBindFromWrongOrNoTeam . cs . show $ buid teamid :: TeamId <- getIdPConfigByIssuerAllowOld (userref ^. uidTenant) Nothing >>= \case - Data.GetIdPFound idp -> pure $ idp ^. idpExtraInfo . wiTeam - Data.GetIdPNotFound -> err - Data.GetIdPDanglingId _ -> err -- database inconsistency - Data.GetIdPNonUnique is -> throwSparSem $ SparUserRefInNoOrMultipleTeams (cs $ show (buid, is)) - Data.GetIdPWrongTeam _ -> err -- impossible + GetIdPFound idp -> pure $ idp ^. idpExtraInfo . wiTeam + GetIdPNotFound -> err + GetIdPDanglingId _ -> err -- database inconsistency + GetIdPNonUnique is -> throwSparSem $ SparUserRefInNoOrMultipleTeams (cs $ show (buid, is)) + GetIdPWrongTeam _ -> err -- impossible acc <- BrigAccess.getAccount Intra.WithPendingInvitations buid >>= maybe err pure teamid' :: TeamId <- userTeam (accountUser acc) & maybe err pure unless (teamid' == teamid) err diff --git a/services/spar/src/Spar/CanonicalInterpreter.hs b/services/spar/src/Spar/CanonicalInterpreter.hs index 5138448f570..5fe32e4900a 100644 --- a/services/spar/src/Spar/CanonicalInterpreter.hs +++ b/services/spar/src/Spar/CanonicalInterpreter.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.CanonicalInterpreter where import qualified Cassandra as Cas diff --git a/services/spar/src/Spar/Data.hs b/services/spar/src/Spar/Data.hs index aaf20ae5653..be1cd5c59de 100644 --- a/services/spar/src/Spar/Data.hs +++ b/services/spar/src/Spar/Data.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -24,100 +24,30 @@ module Spar.Data Env (..), mkEnv, mkTTLAssertions, - - -- * SAML state handling - storeAReqID, - unStoreAReqID, - isAliveAReqID, - storeAssID, - unStoreAssID, - isAliveAssID, - storeVerdictFormat, - getVerdictFormat, + nominalDiffToSeconds, + mkTTLAuthnRequests, + mkTTLAuthnRequestsNDT, -- * SAML Users NormalizedUNameID (..), normalizeUnqualifiedNameId, normalizeQualifiedNameId, - insertSAMLUser, - getSAMLUser, - getSAMLAnyUserByIssuer, - getSAMLSomeUsersByIssuer, - deleteSAMLUsersByIssuer, - deleteSAMLUser, - - -- * Cookies - insertBindCookie, - lookupBindCookie, - - -- * IDPs - storeIdPConfig, - Replaced (..), - Replacing (..), - setReplacedBy, - clearReplacedBy, - GetIdPResult (..), - getIdPConfig, - getIdPIdByIssuerWithoutTeam, - getIdPIdByIssuerWithTeam, - getIdPConfigsByTeam, - deleteIdPConfig, - storeIdPRawMetadata, - getIdPRawMetadata, - deleteIdPRawMetadata, - - -- * SSO settings - storeDefaultSsoCode, - getDefaultSsoCode, - deleteDefaultSsoCode, - - -- * SCIM auth - insertScimToken, - lookupScimToken, - getScimTokens, - deleteScimToken, - deleteTeamScimTokens, - - -- * SCIM externalids, user timestamps - writeScimUserTimes, - readScimUserTimes, - deleteScimUserTimes, - insertScimExternalId, - lookupScimExternalId, - deleteScimExternalId, ) where -import Brig.Types.Common (Email, fromEmail) import Cassandra as Cas -import Control.Arrow (Arrow ((&&&))) import Control.Lens import Control.Monad.Except import Data.CaseInsensitive (foldCase) import qualified Data.CaseInsensitive as CI -import Data.Id -import Data.Json.Util (UTCTimeMillis, toUTCTimeMillis) -import qualified Data.List.NonEmpty as NL import Data.String.Conversions import Data.Time -import Data.X509 (SignedCertificate) import GHC.TypeLits (KnownSymbol) import Imports import SAML2.Util (renderURI) import qualified SAML2.WebSSO as SAML import qualified SAML2.WebSSO.Types.Email as SAMLEmail -import Spar.Data.Instances (VerdictFormatCon, VerdictFormatRow, fromVerdictFormat, toVerdictFormat) -import Spar.Sem.IdP (GetIdPResult (..), Replaced (..), Replacing (..)) -import Text.RawString.QQ -import URI.ByteString -import qualified Web.Cookie as Cky -import Web.Scim.Schema.Common (WithId (..)) -import Web.Scim.Schema.Meta (Meta (..), WithMeta (..)) -import Wire.API.Cookie -import Wire.API.User.IdentityProvider import Wire.API.User.Saml -import Wire.API.User.Scim -import qualified Prelude -- | A lower bound: @schemaVersion <= whatWeFoundOnCassandra@, not @==@. schemaVersion :: Int32 @@ -168,103 +98,6 @@ mkTTLNDT maxttl ttlNDT = nominalDiffToSeconds :: NominalDiffTime -> Int32 nominalDiffToSeconds = round @Double . realToFrac ----------------------------------------------------------------------- --- saml state handling - -storeAReqID :: - (HasCallStack, MonadReader Env m, MonadClient m, MonadError TTLError m) => - AReqId -> - SAML.Time -> - m () -storeAReqID (SAML.ID rid) (SAML.Time endOfLife) = do - env <- ask - TTL ttl <- mkTTLAuthnRequests env endOfLife - retry x5 . write ins $ params LocalQuorum (rid, ttl) - where - ins :: PrepQuery W (SAML.XmlText, Int32) () - ins = "INSERT INTO authreq (req) VALUES (?) USING TTL ?" - -unStoreAReqID :: - (HasCallStack, MonadClient m) => - AReqId -> - m () -unStoreAReqID (SAML.ID rid) = retry x5 . write del . params LocalQuorum $ Identity rid - where - del :: PrepQuery W (Identity SAML.XmlText) () - del = "DELETE FROM authreq WHERE req = ?" - -isAliveAReqID :: - (HasCallStack, MonadClient m) => - AReqId -> - m Bool -isAliveAReqID (SAML.ID rid) = - (==) (Just 1) <$> (retry x1 . query1 sel . params LocalQuorum $ Identity rid) - where - sel :: PrepQuery R (Identity SAML.XmlText) (Identity Int64) - sel = "SELECT COUNT(*) FROM authreq WHERE req = ?" - -storeAssID :: - (HasCallStack, MonadReader Env m, MonadClient m, MonadError TTLError m) => - AssId -> - SAML.Time -> - m () -storeAssID (SAML.ID aid) (SAML.Time endOfLife) = do - env <- ask - TTL ttl <- mkTTLAssertions env endOfLife - retry x5 . write ins $ params LocalQuorum (aid, ttl) - where - ins :: PrepQuery W (SAML.XmlText, Int32) () - ins = "INSERT INTO authresp (resp) VALUES (?) USING TTL ?" - -unStoreAssID :: - (HasCallStack, MonadClient m) => - AssId -> - m () -unStoreAssID (SAML.ID aid) = retry x5 . write del . params LocalQuorum $ Identity aid - where - del :: PrepQuery W (Identity SAML.XmlText) () - del = "DELETE FROM authresp WHERE resp = ?" - -isAliveAssID :: - (HasCallStack, MonadClient m) => - AssId -> - m Bool -isAliveAssID (SAML.ID aid) = - (==) (Just 1) <$> (retry x1 . query1 sel . params LocalQuorum $ Identity aid) - where - sel :: PrepQuery R (Identity SAML.XmlText) (Identity Int64) - sel = "SELECT COUNT(*) FROM authresp WHERE resp = ?" - ----------------------------------------------------------------------- --- spar state handling (not visible to saml2-web-sso) - --- | First argument is the life expectancy of the request. (We store the verdict format for twice --- as long. Reason: if there is some delay in processing a very old request, it would be bad for --- error handling if we couldn't figure out where the error will land.) -storeVerdictFormat :: - (HasCallStack, MonadClient m) => - NominalDiffTime -> - AReqId -> - VerdictFormat -> - m () -storeVerdictFormat diffTime req (fromVerdictFormat -> (fmtCon, fmtMobSucc, fmtMobErr)) = do - let ttl = nominalDiffToSeconds diffTime * 2 - retry x5 . write cql $ params LocalQuorum (req, fmtCon, fmtMobSucc, fmtMobErr, ttl) - where - cql :: PrepQuery W (AReqId, VerdictFormatCon, Maybe URI, Maybe URI, Int32) () - cql = "INSERT INTO verdict (req, format_con, format_mobile_success, format_mobile_error) VALUES (?, ?, ?, ?) USING TTL ?" - -getVerdictFormat :: - (HasCallStack, MonadClient m) => - AReqId -> - m (Maybe VerdictFormat) -getVerdictFormat req = - (>>= toVerdictFormat) - <$> (retry x1 . query1 cql $ params LocalQuorum (Identity req)) - where - cql :: PrepQuery R (Identity AReqId) VerdictFormatRow - cql = "SELECT format_con, format_mobile_success, format_mobile_error FROM verdict WHERE req = ?" - ---------------------------------------------------------------------- -- user @@ -296,595 +129,3 @@ normalizeUnqualifiedNameId = NormalizedUNameID . foldCase . nameIdTxt -- | Qualifiers are ignored. normalizeQualifiedNameId :: SAML.NameID -> NormalizedUNameID normalizeQualifiedNameId = normalizeUnqualifiedNameId . view SAML.nameID - --- | Add new user. If user with this 'SAML.UserId' exists, overwrite it. -insertSAMLUser :: (HasCallStack, MonadClient m) => SAML.UserRef -> UserId -> m () -insertSAMLUser (SAML.UserRef tenant subject) uid = retry x5 . write ins $ params LocalQuorum (tenant, normalizeQualifiedNameId subject, subject, uid) - where - ins :: PrepQuery W (SAML.Issuer, NormalizedUNameID, SAML.NameID, UserId) () - ins = "INSERT INTO user_v2 (issuer, normalized_uname_id, sso_id, uid) VALUES (?, ?, ?, ?)" - --- | Sometimes we only need to know if it's none or more, so this function returns the first one. -getSAMLAnyUserByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m (Maybe UserId) -getSAMLAnyUserByIssuer issuer = - runIdentity - <$$> (retry x1 . query1 sel $ params LocalQuorum (Identity issuer)) - where - sel :: PrepQuery R (Identity SAML.Issuer) (Identity UserId) - sel = "SELECT uid FROM user_v2 WHERE issuer = ? LIMIT 1" - --- | Sometimes (eg., for IdP deletion), we can start anywhere with deleting all users in an --- IdP, and if we don't get all users we just try again when we're done with these. -getSAMLSomeUsersByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m [(SAML.UserRef, UserId)] -getSAMLSomeUsersByIssuer issuer = - (_1 %~ SAML.UserRef issuer) - <$$> (retry x1 . query sel $ params LocalQuorum (Identity issuer)) - where - sel :: PrepQuery R (Identity SAML.Issuer) (SAML.NameID, UserId) - sel = "SELECT sso_id, uid FROM user_v2 WHERE issuer = ? LIMIT 2000" - --- | Lookup a brig 'UserId' by IdP issuer and NameID. --- --- NB: It is not allowed for two distinct wire users from two different teams to have the same --- 'UserRef'. RATIONALE: this allows us to implement 'getSAMLUser' without adding 'TeamId' to --- 'UserRef' (which in turn would break the (admittedly leaky) abstarctions of saml2-web-sso). -getSAMLUser :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) -getSAMLUser uref = do - mbUid <- getSAMLUserNew uref - case mbUid of - Nothing -> migrateLegacy uref - Just uid -> pure $ Just uid - where - getSAMLUserNew :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) - getSAMLUserNew (SAML.UserRef tenant subject) = - runIdentity - <$$> (retry x1 . query1 sel $ params LocalQuorum (tenant, normalizeQualifiedNameId subject)) - where - sel :: PrepQuery R (SAML.Issuer, NormalizedUNameID) (Identity UserId) - sel = "SELECT uid FROM user_v2 WHERE issuer = ? AND normalized_uname_id = ?" - - migrateLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) - migrateLegacy uref' = do - mbUid <- getSAMLUserLegacy uref' - for mbUid $ \uid -> do - insertSAMLUser uref' uid - pure uid - - getSAMLUserLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) - getSAMLUserLegacy (SAML.UserRef tenant subject) = - runIdentity - <$$> (retry x1 . query1 sel $ params LocalQuorum (tenant, subject)) - where - sel :: PrepQuery R (SAML.Issuer, SAML.NameID) (Identity UserId) - sel = "SELECT uid FROM user WHERE issuer = ? AND sso_id = ?" - -deleteSAMLUsersByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m () -deleteSAMLUsersByIssuer issuer = retry x5 . write del $ params LocalQuorum (Identity issuer) - where - del :: PrepQuery W (Identity SAML.Issuer) () - del = "DELETE FROM user_v2 WHERE issuer = ?" - -deleteSAMLUser :: (HasCallStack, MonadClient m) => UserId -> SAML.UserRef -> m () -deleteSAMLUser uid uref = do - muidUref <- getSAMLUser uref - for_ muidUref $ \uidUref -> - when (uidUref == uid) $ do - deleteSAMLUserLegacy uref - deleteSAMLUserNew uref - where - deleteSAMLUserNew :: (HasCallStack, MonadClient m) => SAML.UserRef -> m () - deleteSAMLUserNew (SAML.UserRef tenant subject) = retry x5 . write del $ params LocalQuorum (tenant, normalizeQualifiedNameId subject) - where - del :: PrepQuery W (SAML.Issuer, NormalizedUNameID) () - del = "DELETE FROM user_v2 WHERE issuer = ? AND normalized_uname_id = ?" - deleteSAMLUserLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m () - deleteSAMLUserLegacy (SAML.UserRef tenant subject) = retry x5 . write del $ params LocalQuorum (tenant, subject) - where - del :: PrepQuery W (SAML.Issuer, SAML.NameID) () - del = "DELETE FROM user WHERE issuer = ? AND sso_id = ?" - ----------------------------------------------------------------------- --- bind cookies - --- | Associate the value of a 'BindCookie' with its 'UserId'. The 'TTL' of this entry should be the --- same as the one of the 'AuthnRequest' sent with the cookie. -insertBindCookie :: - (HasCallStack, MonadClient m, MonadReader Env m, MonadError TTLError m) => - SetBindCookie -> - UserId -> - NominalDiffTime -> - m () -insertBindCookie cky uid ttlNDT = do - env <- ask - TTL ttlInt32 <- mkTTLAuthnRequestsNDT env ttlNDT - let ckyval = cs . Cky.setCookieValue . SAML.fromSimpleSetCookie . getSimpleSetCookie $ cky - retry x5 . write ins $ params LocalQuorum (ckyval, uid, ttlInt32) - where - ins :: PrepQuery W (ST, UserId, Int32) () - ins = "INSERT INTO bind_cookie (cookie, session_owner) VALUES (?, ?) USING TTL ?" - --- | The counter-part of 'insertBindCookie'. -lookupBindCookie :: (HasCallStack, MonadClient m) => BindCookie -> m (Maybe UserId) -lookupBindCookie (cs . fromBindCookie -> ckyval :: ST) = - runIdentity <$$> do - (retry x1 . query1 sel $ params LocalQuorum (Identity ckyval)) - where - sel :: PrepQuery R (Identity ST) (Identity UserId) - sel = "SELECT session_owner FROM bind_cookie WHERE cookie = ?" - ----------------------------------------------------------------------- --- idp - -type IdPConfigRow = (SAML.IdPId, SAML.Issuer, URI, SignedCertificate, [SignedCertificate], TeamId, Maybe WireIdPAPIVersion, [SAML.Issuer], Maybe SAML.IdPId) - --- FUTUREWORK: should be called 'insertIdPConfig' for consistency. --- FUTUREWORK: enforce that wiReplacedby is Nothing, or throw an error. there is no --- legitimate reason to store an IdP that has already been replaced. and for updating an old --- one, call 'markReplacedIdP'. -storeIdPConfig :: - (HasCallStack, MonadClient m) => - IdP -> - m () -storeIdPConfig idp = retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - addPrepQuery - ins - ( idp ^. SAML.idpId, - idp ^. SAML.idpMetadata . SAML.edIssuer, - idp ^. SAML.idpMetadata . SAML.edRequestURI, - NL.head (idp ^. SAML.idpMetadata . SAML.edCertAuthnResponse), - NL.tail (idp ^. SAML.idpMetadata . SAML.edCertAuthnResponse), - -- (the 'List1' is split up into head and tail to make migration from one-element-only easier.) - idp ^. SAML.idpExtraInfo . wiTeam, - idp ^. SAML.idpExtraInfo . wiApiVersion, - idp ^. SAML.idpExtraInfo . wiOldIssuers, - idp ^. SAML.idpExtraInfo . wiReplacedBy - ) - addPrepQuery - byIssuer - ( idp ^. SAML.idpMetadata . SAML.edIssuer, - idp ^. SAML.idpExtraInfo . wiTeam, - idp ^. SAML.idpId - ) - addPrepQuery - byTeam - ( idp ^. SAML.idpId, - idp ^. SAML.idpExtraInfo . wiTeam - ) - where - ins :: PrepQuery W IdPConfigRow () - ins = "INSERT INTO idp (idp, issuer, request_uri, public_key, extra_public_keys, team, api_version, old_issuers, replaced_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" - - -- FUTUREWORK: migrate `spar.issuer_idp` away, `spar.issuer_idp_v2` is enough. - byIssuer :: PrepQuery W (SAML.Issuer, TeamId, SAML.IdPId) () - byIssuer = "INSERT INTO issuer_idp_v2 (issuer, team, idp) VALUES (?, ?, ?)" - - byTeam :: PrepQuery W (SAML.IdPId, TeamId) () - byTeam = "INSERT INTO team_idp (idp, team) VALUES (?, ?)" - --- | See also: test case @"{set,clear}ReplacedBy"@ in integration tests ("Test.Spar.DataSpec"). -setReplacedBy :: - (HasCallStack, MonadClient m) => - Replaced -> - Replacing -> - m () -setReplacedBy (Replaced old) (Replacing new) = do - retry x5 . write ins $ params LocalQuorum (new, old) - where - ins :: PrepQuery W (SAML.IdPId, SAML.IdPId) () - ins = "UPDATE idp SET replaced_by = ? WHERE idp = ?" - --- | See also: 'setReplacedBy'. -clearReplacedBy :: - (HasCallStack, MonadClient m) => - Replaced -> - m () -clearReplacedBy (Replaced old) = do - retry x5 . write ins $ params LocalQuorum (Identity old) - where - ins :: PrepQuery W (Identity SAML.IdPId) () - ins = "UPDATE idp SET replaced_by = null WHERE idp = ?" - -getIdPConfig :: - forall m. - (HasCallStack, MonadClient m) => - SAML.IdPId -> - m (Maybe IdP) -getIdPConfig idpid = - traverse toIdp =<< retry x1 (query1 sel $ params LocalQuorum (Identity idpid)) - where - toIdp :: IdPConfigRow -> m IdP - toIdp - ( _idpId, - -- metadata - _edIssuer, - _edRequestURI, - certsHead, - certsTail, - -- extras - teamId, - apiVersion, - oldIssuers, - replacedBy - ) = do - let _edCertAuthnResponse = certsHead NL.:| certsTail - _idpMetadata = SAML.IdPMetadata {..} - _idpExtraInfo = WireIdP teamId apiVersion oldIssuers replacedBy - pure $ SAML.IdPConfig {..} - sel :: PrepQuery R (Identity SAML.IdPId) IdPConfigRow - sel = "SELECT idp, issuer, request_uri, public_key, extra_public_keys, team, api_version, old_issuers, replaced_by FROM idp WHERE idp = ?" - --- | Find 'IdPId' without team. Search both `issuer_idp_v2` and `issuer_idp`; in the former, --- make sure the result is unique (no two IdPs for two different teams). -getIdPIdByIssuerWithoutTeam :: - (HasCallStack, MonadClient m) => - SAML.Issuer -> - m (GetIdPResult SAML.IdPId) -getIdPIdByIssuerWithoutTeam issuer = do - (runIdentity <$$> retry x1 (query selv2 $ params LocalQuorum (Identity issuer))) >>= \case - [] -> - (runIdentity <$$> retry x1 (query1 sel $ params LocalQuorum (Identity issuer))) >>= \case - Just idpid -> pure $ GetIdPFound idpid - Nothing -> pure GetIdPNotFound - [idpid] -> - pure $ GetIdPFound idpid - idpids@(_ : _ : _) -> - pure $ GetIdPNonUnique idpids - where - sel :: PrepQuery R (Identity SAML.Issuer) (Identity SAML.IdPId) - sel = "SELECT idp FROM issuer_idp WHERE issuer = ?" - - selv2 :: PrepQuery R (Identity SAML.Issuer) (Identity SAML.IdPId) - selv2 = "SELECT idp FROM issuer_idp_v2 WHERE issuer = ?" - -getIdPIdByIssuerWithTeam :: - (HasCallStack, MonadClient m) => - SAML.Issuer -> - TeamId -> - m (Maybe SAML.IdPId) -getIdPIdByIssuerWithTeam issuer tid = do - runIdentity <$$> retry x1 (query1 sel $ params LocalQuorum (issuer, tid)) - where - sel :: PrepQuery R (SAML.Issuer, TeamId) (Identity SAML.IdPId) - sel = "SELECT idp FROM issuer_idp_v2 WHERE issuer = ? and team = ?" - -getIdPConfigsByTeam :: - (HasCallStack, MonadClient m) => - TeamId -> - m [IdP] -getIdPConfigsByTeam team = do - idpids <- runIdentity <$$> retry x1 (query sel $ params LocalQuorum (Identity team)) - catMaybes <$> mapM getIdPConfig idpids - where - sel :: PrepQuery R (Identity TeamId) (Identity SAML.IdPId) - sel = "SELECT idp FROM team_idp WHERE team = ?" - -deleteIdPConfig :: - (HasCallStack, MonadClient m) => - SAML.IdPId -> - SAML.Issuer -> - TeamId -> - m () -deleteIdPConfig idp issuer team = retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - addPrepQuery delDefaultIdp (Identity idp) - addPrepQuery delIdp (Identity idp) - addPrepQuery delIssuerIdp (Identity issuer) - addPrepQuery delIssuerIdpV2 (Identity issuer) - addPrepQuery delTeamIdp (team, idp) - where - delDefaultIdp :: PrepQuery W (Identity SAML.IdPId) () - delDefaultIdp = "DELETE FROM default_idp WHERE partition_key_always_default = 'default' AND idp = ?" - - delIdp :: PrepQuery W (Identity SAML.IdPId) () - delIdp = "DELETE FROM idp WHERE idp = ?" - - delIssuerIdp :: PrepQuery W (Identity SAML.Issuer) () - delIssuerIdp = "DELETE FROM issuer_idp WHERE issuer = ?" - - delIssuerIdpV2 :: PrepQuery W (Identity SAML.Issuer) () - delIssuerIdpV2 = "DELETE FROM issuer_idp_v2 WHERE issuer = ?" - - delTeamIdp :: PrepQuery W (TeamId, SAML.IdPId) () - delTeamIdp = "DELETE FROM team_idp WHERE team = ? and idp = ?" - -storeIdPRawMetadata :: - (HasCallStack, MonadClient m) => - SAML.IdPId -> - ST -> - m () -storeIdPRawMetadata idp raw = retry x5 . write ins $ params LocalQuorum (idp, raw) - where - ins :: PrepQuery W (SAML.IdPId, ST) () - ins = "INSERT INTO idp_raw_metadata (id, metadata) VALUES (?, ?)" - -getIdPRawMetadata :: - (HasCallStack, MonadClient m) => - SAML.IdPId -> - m (Maybe ST) -getIdPRawMetadata idp = - runIdentity - <$$> (retry x1 . query1 sel $ params LocalQuorum (Identity idp)) - where - sel :: PrepQuery R (Identity SAML.IdPId) (Identity ST) - sel = "SELECT metadata FROM idp_raw_metadata WHERE id = ?" - -deleteIdPRawMetadata :: - (HasCallStack, MonadClient m) => - SAML.IdPId -> - m () -deleteIdPRawMetadata idp = retry x5 . write del $ params LocalQuorum (Identity idp) - where - del :: PrepQuery W (Identity SAML.IdPId) () - del = "DELETE FROM idp_raw_metadata WHERE id = ?" - ----------------------------------------------------------------------- --- SSO settings - --- It's important to maintain two invariants: --- 1) whenever there is a default code, it must also exist in the idp table --- 2) there can always only be one default SSO code selected - -getDefaultSsoCode :: - (HasCallStack, MonadClient m) => - m (Maybe SAML.IdPId) -getDefaultSsoCode = - runIdentity - <$$> (retry x1 . query1 sel $ params LocalQuorum ()) - where - sel :: PrepQuery R () (Identity SAML.IdPId) - sel = "SELECT idp FROM default_idp WHERE partition_key_always_default = 'default' ORDER BY idp LIMIT 1" - -storeDefaultSsoCode :: - (HasCallStack, MonadClient m) => - SAML.IdPId -> - m () -storeDefaultSsoCode idpId = do - -- there is a race condition here which means there could potentially be more - -- than one entry (violating invariant 2). - -- However, the SELECT query will deterministally pick one of them due to the - -- `ORDER BY` clause. The others will get removed by `deleteDefaultSsoCode` - -- the next time this function is called (as it removes all entries). - deleteDefaultSsoCode - retry x5 . write ins $ params LocalQuorum (Identity idpId) - where - ins :: PrepQuery W (Identity SAML.IdPId) () - ins = "INSERT INTO default_idp (partition_key_always_default, idp) VALUES ('default', ?)" - -deleteDefaultSsoCode :: - (HasCallStack, MonadClient m) => - m () -deleteDefaultSsoCode = retry x5 . write del $ params LocalQuorum () - where - del :: PrepQuery W () () - del = "DELETE FROM default_idp WHERE partition_key_always_default = 'default'" - ----------------------------------------------------------------------- --- SCIM auth --- --- docs/developer/scim/storage.md {#DevScimStorageTokens} - -type ScimTokenRow = (ScimTokenLookupKey, TeamId, ScimTokenId, UTCTime, Maybe SAML.IdPId, Text) - -fromScimTokenRow :: ScimTokenRow -> ScimTokenInfo -fromScimTokenRow (_, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) = - ScimTokenInfo {..} - -scimTokenLookupKey :: ScimTokenRow -> ScimTokenLookupKey -scimTokenLookupKey (key, _, _, _, _, _) = key - --- | Add a new SCIM provisioning token. The token should be random and --- generated by the backend, not by the user. -insertScimToken :: - (HasCallStack, MonadClient m) => - ScimToken -> - ScimTokenInfo -> - m () -insertScimToken token ScimTokenInfo {..} = retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - let tokenHash = hashScimToken token - addPrepQuery insByToken (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) - addPrepQuery insByTeam (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) - -insByToken, insByTeam :: PrepQuery W ScimTokenRow () -insByToken = - [r| - INSERT INTO team_provisioning_by_token - (token_, team, id, created_at, idp, descr) - VALUES (?, ?, ?, ?, ?, ?) - |] -insByTeam = - [r| - INSERT INTO team_provisioning_by_team - (token_, team, id, created_at, idp, descr) - VALUES (?, ?, ?, ?, ?, ?) - |] - --- | Check whether a token exists and if yes, what team and IdP are --- associated with it. -lookupScimToken :: - (HasCallStack, MonadClient m) => - ScimToken -> - m (Maybe ScimTokenInfo) -lookupScimToken token = do - let tokenHash = hashScimToken token - rows <- retry x1 . query sel $ params LocalQuorum (tokenHash, token) - case fmap (scimTokenLookupKey &&& Prelude.id) rows of - [(ScimTokenLookupKeyHashed _, row)] -> - pure (Just (fromScimTokenRow row)) - [(ScimTokenLookupKeyPlaintext plain, row)] -> - convert plain row - [(ScimTokenLookupKeyHashed _, _), (ScimTokenLookupKeyPlaintext plain, row)] -> - convert plain row - [(ScimTokenLookupKeyPlaintext plain, row), (ScimTokenLookupKeyHashed _, _)] -> - convert plain row - _ -> pure Nothing - where - sel :: PrepQuery R (ScimTokenHash, ScimToken) ScimTokenRow - sel = - [r| - SELECT token_, team, id, created_at, idp, descr - FROM team_provisioning_by_token WHERE token_ in (?, ?) - |] - - convert :: MonadClient m => ScimToken -> ScimTokenRow -> m (Maybe ScimTokenInfo) - convert plain row = do - let tokenInfo = fromScimTokenRow row - connvertPlaintextToken plain tokenInfo - pure (Just tokenInfo) - -connvertPlaintextToken :: - (HasCallStack, MonadClient m) => - ScimToken -> - ScimTokenInfo -> - m () -connvertPlaintextToken token ScimTokenInfo {..} = retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - let tokenHash = hashScimToken token - -- enter by new lookup key - addPrepQuery insByToken (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) - -- update info table - addPrepQuery insByTeam (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) - -- remove old lookup key - addPrepQuery delByTokenLookup (Identity (ScimTokenLookupKeyPlaintext token)) - --- | List all tokens associated with a team, in the order of their creation. -getScimTokens :: - (HasCallStack, MonadClient m) => - TeamId -> - m [ScimTokenInfo] -getScimTokens team = do - -- We don't need pagination here because the limit should be pretty low - -- (e.g. 16). If the limit grows, we might have to introduce pagination. - rows <- retry x1 . query sel $ params LocalQuorum (Identity team) - pure $ sortOn stiCreatedAt $ map fromScimTokenRow rows - where - sel :: PrepQuery R (Identity TeamId) ScimTokenRow - sel = - [r| - SELECT token_, team, id, created_at, idp, descr - FROM team_provisioning_by_team WHERE team = ? - |] - --- | Delete a token. -deleteScimToken :: - (HasCallStack, MonadClient m) => - TeamId -> - ScimTokenId -> - m () -deleteScimToken team tokenid = do - mbToken <- retry x1 . query1 selById $ params LocalQuorum (team, tokenid) - retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - addPrepQuery delById (team, tokenid) - for_ mbToken $ \(Identity key) -> - addPrepQuery delByTokenLookup (Identity key) - where - selById :: PrepQuery R (TeamId, ScimTokenId) (Identity ScimTokenLookupKey) - selById = - [r| - SELECT token_ FROM team_provisioning_by_team - WHERE team = ? AND id = ? - |] - -delById :: PrepQuery W (TeamId, ScimTokenId) () -delById = - [r| - DELETE FROM team_provisioning_by_team - WHERE team = ? AND id = ? - |] - -delByTokenLookup :: PrepQuery W (Identity ScimTokenLookupKey) () -delByTokenLookup = - [r| - DELETE FROM team_provisioning_by_token - WHERE token_ = ? -|] - --- | Delete all tokens belonging to a team. -deleteTeamScimTokens :: - (HasCallStack, MonadClient m) => - TeamId -> - m () -deleteTeamScimTokens team = do - tokens <- retry x5 $ query sel $ params LocalQuorum (Identity team) - retry x5 . batch $ do - setType BatchLogged - setConsistency LocalQuorum - addPrepQuery delByTeam (Identity team) - mapM_ (addPrepQuery delByTokenLookup) tokens - where - sel :: PrepQuery R (Identity TeamId) (Identity ScimTokenLookupKey) - sel = "SELECT token_ FROM team_provisioning_by_team WHERE team = ?" - delByTeam :: PrepQuery W (Identity TeamId) () - delByTeam = "DELETE FROM team_provisioning_by_team WHERE team = ?" - ----------------------------------------------------------------------- --- SCIM user records --- --- docs/developer/scim/storage.md {#DevScimStorageUsers} - --- | Store creation and last-update time from the scim metadata under a user id. -writeScimUserTimes :: (HasCallStack, MonadClient m) => WithMeta (WithId UserId a) -> m () -writeScimUserTimes (WithMeta meta (WithId uid _)) = - retry x5 . write ins $ - params - LocalQuorum - ( uid, - toUTCTimeMillis $ created meta, - toUTCTimeMillis $ lastModified meta - ) - where - ins :: PrepQuery W (UserId, UTCTimeMillis, UTCTimeMillis) () - ins = "INSERT INTO scim_user_times (uid, created_at, last_updated_at) VALUES (?, ?, ?)" - --- | Read creation and last-update time from database for a given user id. -readScimUserTimes :: (HasCallStack, MonadClient m) => UserId -> m (Maybe (UTCTimeMillis, UTCTimeMillis)) -readScimUserTimes uid = do - retry x1 . query1 sel $ params LocalQuorum (Identity uid) - where - sel :: PrepQuery R (Identity UserId) (UTCTimeMillis, UTCTimeMillis) - sel = "SELECT created_at, last_updated_at FROM scim_user_times WHERE uid = ?" - --- | Delete a SCIM user's access times by id. --- You'll also want to ensure they are deleted in Brig and in the SAML Users table. -deleteScimUserTimes :: - (HasCallStack, MonadClient m) => - UserId -> - m () -deleteScimUserTimes uid = retry x5 . write del $ params LocalQuorum (Identity uid) - where - del :: PrepQuery W (Identity UserId) () - del = "DELETE FROM scim_user_times WHERE uid = ?" - --- | If a scim externalId does not have an associated saml idp issuer, it cannot be stored in --- table @spar.user@. In those cases, and only in those cases, we store the mapping to --- 'UserId' here. (Note that since there is no associated IdP, the externalId is required to --- be an email address, so we enforce that in the type signature, even though we only use it --- as a 'Text'.) -insertScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> UserId -> m () -insertScimExternalId tid (fromEmail -> email) uid = - retry x5 . write insert $ params LocalQuorum (tid, email, uid) - where - insert :: PrepQuery W (TeamId, Text, UserId) () - insert = "INSERT INTO scim_external (team, external_id, user) VALUES (?, ?, ?)" - --- | The inverse of 'insertScimExternalId'. -lookupScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> m (Maybe UserId) -lookupScimExternalId tid (fromEmail -> email) = runIdentity <$$> (retry x1 . query1 sel $ params LocalQuorum (tid, email)) - where - sel :: PrepQuery R (TeamId, Text) (Identity UserId) - sel = "SELECT user FROM scim_external WHERE team = ? and external_id = ?" - --- | The other inverse of 'insertScimExternalId' :). -deleteScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> m () -deleteScimExternalId tid (fromEmail -> email) = - retry x5 . write delete $ params LocalQuorum (tid, email) - where - delete :: PrepQuery W (TeamId, Text) () - delete = "DELETE FROM scim_external WHERE team = ? and external_id = ?" diff --git a/services/spar/src/Spar/Data/Instances.hs b/services/spar/src/Spar/Data/Instances.hs index c1d289cbe7d..78ff47130ec 100644 --- a/services/spar/src/Spar/Data/Instances.hs +++ b/services/spar/src/Spar/Data/Instances.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Error.hs b/services/spar/src/Spar/Error.hs index 6d1e83b03de..9864bf82140 100644 --- a/services/spar/src/Spar/Error.hs +++ b/services/spar/src/Spar/Error.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Intra/Brig.hs b/services/spar/src/Spar/Intra/Brig.hs index cc0be602d73..b5815ff5219 100644 --- a/services/spar/src/Spar/Intra/Brig.hs +++ b/services/spar/src/Spar/Intra/Brig.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Intra/BrigApp.hs b/services/spar/src/Spar/Intra/BrigApp.hs index 68777a7db07..2d4b91c7afe 100644 --- a/services/spar/src/Spar/Intra/BrigApp.hs +++ b/services/spar/src/Spar/Intra/BrigApp.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Intra/Galley.hs b/services/spar/src/Spar/Intra/Galley.hs index f4984b2b059..998bb84c9fe 100644 --- a/services/spar/src/Spar/Intra/Galley.hs +++ b/services/spar/src/Spar/Intra/Galley.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Options.hs b/services/spar/src/Spar/Options.hs index 55d040520d6..e12635018ea 100644 --- a/services/spar/src/Spar/Options.hs +++ b/services/spar/src/Spar/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Orphans.hs b/services/spar/src/Spar/Orphans.hs index d2d3690d66b..ba96d1fe3dd 100644 --- a/services/spar/src/Spar/Orphans.hs +++ b/services/spar/src/Spar/Orphans.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Run.hs b/services/spar/src/Spar/Run.hs index 325d96665e6..3e956b73bfb 100644 --- a/services/spar/src/Spar/Run.hs +++ b/services/spar/src/Spar/Run.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Scim.hs b/services/spar/src/Spar/Scim.hs index 95ae0d4db5e..a630bd58afe 100644 --- a/services/spar/src/Spar/Scim.hs +++ b/services/spar/src/Spar/Scim.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Scim/Auth.hs b/services/spar/src/Spar/Scim/Auth.hs index f3ae450783d..3b48bbcccc8 100644 --- a/services/spar/src/Spar/Scim/Auth.hs +++ b/services/spar/src/Spar/Scim/Auth.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -128,7 +128,7 @@ createScimToken zusr CreateScimToken {..} = do let descr = createScimTokenDescr teamid <- Intra.Brig.authorizeScimTokenManagement zusr BrigAccess.ensureReAuthorised zusr createScimTokenPassword - tokenNumber <- fmap length $ ScimTokenStore.getByTeam teamid + tokenNumber <- fmap length $ ScimTokenStore.lookupByTeam teamid maxTokens <- inputs maxScimTokens unless (tokenNumber < maxTokens) $ throwSparSem E.SparProvisioningTokenLimitReached @@ -190,4 +190,4 @@ listScimTokens :: Sem r ScimTokenList listScimTokens zusr = do teamid <- Intra.Brig.authorizeScimTokenManagement zusr - ScimTokenList <$> ScimTokenStore.getByTeam teamid + ScimTokenList <$> ScimTokenStore.lookupByTeam teamid diff --git a/services/spar/src/Spar/Scim/Types.hs b/services/spar/src/Spar/Scim/Types.hs index 78d21665256..09deb0b723c 100644 --- a/services/spar/src/Spar/Scim/Types.hs +++ b/services/spar/src/Spar/Scim/Types.hs @@ -17,7 +17,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Scim/User.hs b/services/spar/src/Spar/Scim/User.hs index 6b1499dcc5b..9e04f3ee2f0 100644 --- a/services/spar/src/Spar/Scim/User.hs +++ b/services/spar/src/Spar/Scim/User.hs @@ -13,7 +13,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/src/Spar/Sem/AReqIDStore.hs b/services/spar/src/Spar/Sem/AReqIDStore.hs index 19321121960..12f5b7b10eb 100644 --- a/services/spar/src/Spar/Sem/AReqIDStore.hs +++ b/services/spar/src/Spar/Sem/AReqIDStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AReqIDStore where import Imports diff --git a/services/spar/src/Spar/Sem/AReqIDStore/Cassandra.hs b/services/spar/src/Spar/Sem/AReqIDStore/Cassandra.hs index 68d6c57ebf1..6692ad8c146 100644 --- a/services/spar/src/Spar/Sem/AReqIDStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/AReqIDStore/Cassandra.hs @@ -1,19 +1,38 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AReqIDStore.Cassandra where -import Cassandra -import Control.Monad.Except (runExceptT) -import Imports hiding (MonadReader (..), Reader) +import Cassandra as Cas +import Control.Lens +import Control.Monad.Except +import Imports import Polysemy import Polysemy.Error import Polysemy.Input (Input, input) import SAML2.WebSSO (fromTime) import qualified SAML2.WebSSO as SAML import qualified Spar.Data as Data +import Spar.Data.Instances () import Spar.Error import Spar.Sem.AReqIDStore import Spar.Sem.Now (Now) import qualified Spar.Sem.Now as Now -import Wire.API.User.Saml (Opts, TTLError) +import Wire.API.User.Saml aReqIDStoreToCassandra :: forall m r a. @@ -23,12 +42,44 @@ aReqIDStoreToCassandra :: aReqIDStoreToCassandra = interpret $ \case Store itla t -> do denv <- Data.mkEnv <$> input <*> (fromTime <$> Now.get) - a <- embed @m $ runExceptT $ runReaderT (Data.storeAReqID itla t) denv + a <- embed @m $ runExceptT $ runReaderT (storeAReqID itla t) denv case a of Left err -> throw err Right () -> pure () - UnStore itla -> embed @m $ Data.unStoreAReqID itla - IsAlive itla -> embed @m $ Data.isAliveAReqID itla + UnStore itla -> embed @m $ unStoreAReqID itla + IsAlive itla -> embed @m $ isAliveAReqID itla ttlErrorToSparError :: Member (Error SparError) r => Sem (Error TTLError ': r) a -> Sem r a ttlErrorToSparError = mapError (SAML.CustomError . SparCassandraTTLError) + +storeAReqID :: + (HasCallStack, MonadReader Data.Env m, MonadClient m, MonadError TTLError m) => + AReqId -> + SAML.Time -> + m () +storeAReqID (SAML.ID rid) (SAML.Time endOfLife) = do + env <- ask + TTL ttl <- Data.mkTTLAuthnRequests env endOfLife + retry x5 . write ins $ params LocalQuorum (rid, ttl) + where + ins :: PrepQuery W (SAML.XmlText, Int32) () + ins = "INSERT INTO authreq (req) VALUES (?) USING TTL ?" + +unStoreAReqID :: + (HasCallStack, MonadClient m) => + AReqId -> + m () +unStoreAReqID (SAML.ID rid) = retry x5 . write del . params LocalQuorum $ Identity rid + where + del :: PrepQuery W (Identity SAML.XmlText) () + del = "DELETE FROM authreq WHERE req = ?" + +isAliveAReqID :: + (HasCallStack, MonadClient m) => + AReqId -> + m Bool +isAliveAReqID (SAML.ID rid) = + (==) (Just 1) <$> (retry x1 . query1 sel . params LocalQuorum $ Identity rid) + where + sel :: PrepQuery R (Identity SAML.XmlText) (Identity Int64) + sel = "SELECT COUNT(*) FROM authreq WHERE req = ?" diff --git a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs index cd1343838cf..1ede1d5fb2a 100644 --- a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AReqIDStore.Mem where import qualified Data.Map as M diff --git a/services/spar/src/Spar/Sem/AssIDStore.hs b/services/spar/src/Spar/Sem/AssIDStore.hs index bee1e731d2a..845e08184fa 100644 --- a/services/spar/src/Spar/Sem/AssIDStore.hs +++ b/services/spar/src/Spar/Sem/AssIDStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AssIDStore where import Imports diff --git a/services/spar/src/Spar/Sem/AssIDStore/Cassandra.hs b/services/spar/src/Spar/Sem/AssIDStore/Cassandra.hs index f9fff024e8a..118bac7b0e8 100644 --- a/services/spar/src/Spar/Sem/AssIDStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/AssIDStore/Cassandra.hs @@ -1,17 +1,37 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AssIDStore.Cassandra where -import Cassandra -import Control.Monad.Except (runExceptT) -import Imports hiding (MonadReader (..), Reader) +import Cassandra as Cas +import Control.Lens +import Control.Monad.Except +import Imports import Polysemy import Polysemy.Error import Polysemy.Input import SAML2.WebSSO (fromTime) +import qualified SAML2.WebSSO as SAML import qualified Spar.Data as Data +import Spar.Data.Instances () import Spar.Sem.AssIDStore import Spar.Sem.Now (Now) import qualified Spar.Sem.Now as Now -import Wire.API.User.Saml (Opts, TTLError) +import Wire.API.User.Saml assIDStoreToCassandra :: forall m r a. @@ -22,9 +42,41 @@ assIDStoreToCassandra = interpret $ \case Store itla t -> do denv <- Data.mkEnv <$> input <*> (fromTime <$> Now.get) - a <- embed @m $ runExceptT $ runReaderT (Data.storeAssID itla t) denv + a <- embed @m $ runExceptT $ runReaderT (storeAssID itla t) denv case a of Left err -> throw err Right () -> pure () - UnStore itla -> embed @m $ Data.unStoreAssID itla - IsAlive itla -> embed @m $ Data.isAliveAssID itla + UnStore itla -> embed @m $ unStoreAssID itla + IsAlive itla -> embed @m $ isAliveAssID itla + +storeAssID :: + (HasCallStack, MonadReader Data.Env m, MonadClient m, MonadError TTLError m) => + AssId -> + SAML.Time -> + m () +storeAssID (SAML.ID aid) (SAML.Time endOfLife) = do + env <- ask + TTL ttl <- Data.mkTTLAssertions env endOfLife + retry x5 . write ins $ params LocalQuorum (aid, ttl) + where + ins :: PrepQuery W (SAML.XmlText, Int32) () + ins = "INSERT INTO authresp (resp) VALUES (?) USING TTL ?" + +unStoreAssID :: + (HasCallStack, MonadClient m) => + AssId -> + m () +unStoreAssID (SAML.ID aid) = retry x5 . write del . params LocalQuorum $ Identity aid + where + del :: PrepQuery W (Identity SAML.XmlText) () + del = "DELETE FROM authresp WHERE resp = ?" + +isAliveAssID :: + (HasCallStack, MonadClient m) => + AssId -> + m Bool +isAliveAssID (SAML.ID aid) = + (==) (Just 1) <$> (retry x1 . query1 sel . params LocalQuorum $ Identity aid) + where + sel :: PrepQuery R (Identity SAML.XmlText) (Identity Int64) + sel = "SELECT COUNT(*) FROM authresp WHERE resp = ?" diff --git a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs index 45ae969f9cd..c5e8e65f208 100644 --- a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.AssIDStore.Mem where import qualified Data.Map as M diff --git a/services/spar/src/Spar/Sem/BindCookieStore.hs b/services/spar/src/Spar/Sem/BindCookieStore.hs index cf79fdeddb4..39fbde3bc68 100644 --- a/services/spar/src/Spar/Sem/BindCookieStore.hs +++ b/services/spar/src/Spar/Sem/BindCookieStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.BindCookieStore where import Data.Id (UserId) diff --git a/services/spar/src/Spar/Sem/BindCookieStore/Cassandra.hs b/services/spar/src/Spar/Sem/BindCookieStore/Cassandra.hs index 6cfbb40412b..3af3426a006 100644 --- a/services/spar/src/Spar/Sem/BindCookieStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/BindCookieStore/Cassandra.hs @@ -1,19 +1,43 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.BindCookieStore.Cassandra where -import Cassandra -import Control.Monad.Except (runExceptT) -import Imports hiding (MonadReader (..), Reader) +import Cassandra as Cas +import Control.Lens +import Control.Monad.Except +import Data.Id +import Data.String.Conversions +import Data.Time +import Imports import Polysemy import Polysemy.Error import Polysemy.Input import SAML2.WebSSO (fromTime) +import qualified SAML2.WebSSO as SAML import qualified Spar.Data as Data import Spar.Sem.BindCookieStore import Spar.Sem.Now (Now) import qualified Spar.Sem.Now as Now -import Wire.API.User.Saml (Opts, TTLError) +import qualified Web.Cookie as Cky +import Wire.API.Cookie +import Wire.API.User.Saml bindCookieStoreToCassandra :: forall m r a. @@ -23,8 +47,34 @@ bindCookieStoreToCassandra :: bindCookieStoreToCassandra = interpret $ \case Insert sbc uid ndt -> do denv <- Data.mkEnv <$> input <*> (fromTime <$> Now.get) - a <- embed @m $ runExceptT $ runReaderT (Data.insertBindCookie sbc uid ndt) denv + a <- embed @m $ runExceptT $ runReaderT (insertBindCookie sbc uid ndt) denv case a of Left err -> throw err Right () -> pure () - Lookup bc -> embed @m $ Data.lookupBindCookie bc + Lookup bc -> embed @m $ lookupBindCookie bc + +-- | Associate the value of a 'BindCookie' with its 'UserId'. The 'TTL' of this entry should be the +-- same as the one of the 'AuthnRequest' sent with the cookie. +insertBindCookie :: + (HasCallStack, MonadClient m, MonadReader Data.Env m, MonadError TTLError m) => + SetBindCookie -> + UserId -> + NominalDiffTime -> + m () +insertBindCookie cky uid ttlNDT = do + env <- ask + TTL ttlInt32 <- Data.mkTTLAuthnRequestsNDT env ttlNDT + let ckyval = cs . Cky.setCookieValue . SAML.fromSimpleSetCookie . getSimpleSetCookie $ cky + retry x5 . write ins $ params LocalQuorum (ckyval, uid, ttlInt32) + where + ins :: PrepQuery W (ST, UserId, Int32) () + ins = "INSERT INTO bind_cookie (cookie, session_owner) VALUES (?, ?) USING TTL ?" + +-- | The counter-part of 'insertBindCookie'. +lookupBindCookie :: (HasCallStack, MonadClient m) => BindCookie -> m (Maybe UserId) +lookupBindCookie (cs . fromBindCookie -> ckyval :: ST) = + runIdentity <$$> do + (retry x1 . query1 sel $ params LocalQuorum (Identity ckyval)) + where + sel :: PrepQuery R (Identity ST) (Identity UserId) + sel = "SELECT session_owner FROM bind_cookie WHERE cookie = ?" diff --git a/services/spar/src/Spar/Sem/BindCookieStore/Mem.hs b/services/spar/src/Spar/Sem/BindCookieStore/Mem.hs index c25acc73808..8ac759a0eb5 100644 --- a/services/spar/src/Spar/Sem/BindCookieStore/Mem.hs +++ b/services/spar/src/Spar/Sem/BindCookieStore/Mem.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.BindCookieStore.Mem where import Data.Id (UserId) diff --git a/services/spar/src/Spar/Sem/BrigAccess.hs b/services/spar/src/Spar/Sem/BrigAccess.hs index 8d5fb82b383..0720dea0fb4 100644 --- a/services/spar/src/Spar/Sem/BrigAccess.hs +++ b/services/spar/src/Spar/Sem/BrigAccess.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.BrigAccess where import Brig.Types.Intra diff --git a/services/spar/src/Spar/Sem/BrigAccess/Http.hs b/services/spar/src/Spar/Sem/BrigAccess/Http.hs index 8f739dae4cf..78a7f41216a 100644 --- a/services/spar/src/Spar/Sem/BrigAccess/Http.hs +++ b/services/spar/src/Spar/Sem/BrigAccess/Http.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.BrigAccess.Http where import Bilge diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode.hs b/services/spar/src/Spar/Sem/DefaultSsoCode.hs index af9a49bda4c..8693a96daf6 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.DefaultSsoCode where import Imports diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs index 2a0ac8332aa..c8c0bee1354 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs @@ -1,11 +1,29 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.DefaultSsoCode.Cassandra where import Cassandra import Imports import Polysemy -import qualified Spar.Data as Data +import qualified SAML2.WebSSO.Types as SAML +import Spar.Data.Instances () import Spar.Sem.DefaultSsoCode defaultSsoCodeToCassandra :: @@ -16,6 +34,44 @@ defaultSsoCodeToCassandra :: defaultSsoCodeToCassandra = interpret $ embed @m . \case - Get -> Data.getDefaultSsoCode - Store ip -> Data.storeDefaultSsoCode ip - Delete -> Data.deleteDefaultSsoCode + Get -> getDefaultSsoCode + Store ip -> storeDefaultSsoCode ip + Delete -> deleteDefaultSsoCode + +-- It's important to maintain two invariants: +-- 1) whenever there is a default code, it must also exist in the idp table +-- 2) there can always only be one default SSO code selected + +getDefaultSsoCode :: + (HasCallStack, MonadClient m) => + m (Maybe SAML.IdPId) +getDefaultSsoCode = + runIdentity + <$$> (retry x1 . query1 sel $ params LocalQuorum ()) + where + sel :: PrepQuery R () (Identity SAML.IdPId) + sel = "SELECT idp FROM default_idp WHERE partition_key_always_default = 'default' ORDER BY idp LIMIT 1" + +storeDefaultSsoCode :: + (HasCallStack, MonadClient m) => + SAML.IdPId -> + m () +storeDefaultSsoCode idpId = do + -- there is a race condition here which means there could potentially be more + -- than one entry (violating invariant 2). + -- However, the SELECT query will deterministally pick one of them due to the + -- `ORDER BY` clause. The others will get removed by `deleteDefaultSsoCode` + -- the next time this function is called (as it removes all entries). + deleteDefaultSsoCode + retry x5 . write ins $ params LocalQuorum (Identity idpId) + where + ins :: PrepQuery W (Identity SAML.IdPId) () + ins = "INSERT INTO default_idp (partition_key_always_default, idp) VALUES ('default', ?)" + +deleteDefaultSsoCode :: + (HasCallStack, MonadClient m) => + m () +deleteDefaultSsoCode = retry x5 . write del $ params LocalQuorum () + where + del :: PrepQuery W () () + del = "DELETE FROM default_idp WHERE partition_key_always_default = 'default'" diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs index a6be5be98b0..aee46151f97 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.DefaultSsoCode.Mem where import Imports diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs index e9aac14b42a..d4dd4ad848d 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs @@ -1,6 +1,23 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.DefaultSsoCode.Spec (propsForInterpreter) where import Imports diff --git a/services/spar/src/Spar/Sem/GalleyAccess.hs b/services/spar/src/Spar/Sem/GalleyAccess.hs index 8a3952db218..18eb6a1beed 100644 --- a/services/spar/src/Spar/Sem/GalleyAccess.hs +++ b/services/spar/src/Spar/Sem/GalleyAccess.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.GalleyAccess where import Data.Id (TeamId, UserId) diff --git a/services/spar/src/Spar/Sem/GalleyAccess/Http.hs b/services/spar/src/Spar/Sem/GalleyAccess/Http.hs index 127d34028cd..6ff9aa7db1a 100644 --- a/services/spar/src/Spar/Sem/GalleyAccess/Http.hs +++ b/services/spar/src/Spar/Sem/GalleyAccess/Http.hs @@ -1,5 +1,22 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.GalleyAccess.Http where import Bilge diff --git a/services/spar/src/Spar/Sem/IdP.hs b/services/spar/src/Spar/Sem/IdP.hs index 81674e06e6e..8b4593457d2 100644 --- a/services/spar/src/Spar/Sem/IdP.hs +++ b/services/spar/src/Spar/Sem/IdP.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdP where import Data.Id diff --git a/services/spar/src/Spar/Sem/IdP/Cassandra.hs b/services/spar/src/Spar/Sem/IdP/Cassandra.hs index 63a3e88bfb4..efecf935e25 100644 --- a/services/spar/src/Spar/Sem/IdP/Cassandra.hs +++ b/services/spar/src/Spar/Sem/IdP/Cassandra.hs @@ -1,31 +1,231 @@ +{-# LANGUAGE RecordWildCards #-} + +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdP.Cassandra where import Cassandra import Control.Lens ((^.)) +import Control.Monad.Except +import Data.Id +import qualified Data.List.NonEmpty as NL +import Data.X509 (SignedCertificate) import Imports import Polysemy -import qualified SAML2.WebSSO.Types as SAML -import qualified Spar.Data as Data -import Spar.Sem.IdP -import Wire.API.User.IdentityProvider (wiTeam) +import qualified SAML2.WebSSO as SAML +import Spar.Data.Instances () +import Spar.Sem.IdP (GetIdPResult (..), Replaced (..), Replacing (..)) +import qualified Spar.Sem.IdP as Eff +import URI.ByteString +import Wire.API.User.IdentityProvider idPToCassandra :: forall m r a. (MonadClient m, Member (Embed m) r) => - Sem (IdP ': r) a -> + Sem (Eff.IdP ': r) a -> Sem r a idPToCassandra = interpret $ embed @m . \case - StoreConfig iw -> Data.storeIdPConfig iw - GetConfig i -> Data.getIdPConfig i - GetIdByIssuerWithoutTeam i -> Data.getIdPIdByIssuerWithoutTeam i - GetIdByIssuerWithTeam i t -> Data.getIdPIdByIssuerWithTeam i t - GetConfigsByTeam itlt -> Data.getIdPConfigsByTeam itlt - DeleteConfig idp -> + Eff.StoreConfig iw -> storeIdPConfig iw + Eff.GetConfig i -> getIdPConfig i + Eff.GetIdByIssuerWithoutTeam i -> getIdPIdByIssuerWithoutTeam i + Eff.GetIdByIssuerWithTeam i t -> getIdPIdByIssuerWithTeam i t + Eff.GetConfigsByTeam itlt -> getIdPConfigsByTeam itlt + Eff.DeleteConfig idp -> let idpid = idp ^. SAML.idpId issuer = idp ^. SAML.idpMetadata . SAML.edIssuer team = idp ^. SAML.idpExtraInfo . wiTeam - in Data.deleteIdPConfig idpid issuer team - SetReplacedBy r r11 -> Data.setReplacedBy r r11 - ClearReplacedBy r -> Data.clearReplacedBy r + in deleteIdPConfig idpid issuer team + Eff.SetReplacedBy r r11 -> setReplacedBy r r11 + Eff.ClearReplacedBy r -> clearReplacedBy r + +type IdPConfigRow = (SAML.IdPId, SAML.Issuer, URI, SignedCertificate, [SignedCertificate], TeamId, Maybe WireIdPAPIVersion, [SAML.Issuer], Maybe SAML.IdPId) + +-- FUTUREWORK: should be called 'insertIdPConfig' for consistency. +-- FUTUREWORK: enforce that wiReplacedby is Nothing, or throw an error. there is no +-- legitimate reason to store an IdP that has already been replaced. and for updating an old +-- one, call 'markReplacedIdP'. +storeIdPConfig :: + (HasCallStack, MonadClient m) => + IdP -> + m () +storeIdPConfig idp = retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + addPrepQuery + ins + ( idp ^. SAML.idpId, + idp ^. SAML.idpMetadata . SAML.edIssuer, + idp ^. SAML.idpMetadata . SAML.edRequestURI, + NL.head (idp ^. SAML.idpMetadata . SAML.edCertAuthnResponse), + NL.tail (idp ^. SAML.idpMetadata . SAML.edCertAuthnResponse), + -- (the 'List1' is split up into head and tail to make migration from one-element-only easier.) + idp ^. SAML.idpExtraInfo . wiTeam, + idp ^. SAML.idpExtraInfo . wiApiVersion, + idp ^. SAML.idpExtraInfo . wiOldIssuers, + idp ^. SAML.idpExtraInfo . wiReplacedBy + ) + addPrepQuery + byIssuer + ( idp ^. SAML.idpMetadata . SAML.edIssuer, + idp ^. SAML.idpExtraInfo . wiTeam, + idp ^. SAML.idpId + ) + addPrepQuery + byTeam + ( idp ^. SAML.idpId, + idp ^. SAML.idpExtraInfo . wiTeam + ) + where + ins :: PrepQuery W IdPConfigRow () + ins = "INSERT INTO idp (idp, issuer, request_uri, public_key, extra_public_keys, team, api_version, old_issuers, replaced_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" + + -- FUTUREWORK: migrate `spar.issuer_idp` away, `spar.issuer_idp_v2` is enough. + byIssuer :: PrepQuery W (SAML.Issuer, TeamId, SAML.IdPId) () + byIssuer = "INSERT INTO issuer_idp_v2 (issuer, team, idp) VALUES (?, ?, ?)" + + byTeam :: PrepQuery W (SAML.IdPId, TeamId) () + byTeam = "INSERT INTO team_idp (idp, team) VALUES (?, ?)" + +getIdPConfig :: + forall m. + (HasCallStack, MonadClient m) => + SAML.IdPId -> + m (Maybe IdP) +getIdPConfig idpid = + traverse toIdp =<< retry x1 (query1 sel $ params LocalQuorum (Identity idpid)) + where + toIdp :: IdPConfigRow -> m IdP + toIdp + ( _idpId, + -- metadata + _edIssuer, + _edRequestURI, + certsHead, + certsTail, + -- extras + teamId, + apiVersion, + oldIssuers, + replacedBy + ) = do + let _edCertAuthnResponse = certsHead NL.:| certsTail + _idpMetadata = SAML.IdPMetadata {..} + _idpExtraInfo = WireIdP teamId apiVersion oldIssuers replacedBy + pure $ SAML.IdPConfig {..} + sel :: PrepQuery R (Identity SAML.IdPId) IdPConfigRow + sel = "SELECT idp, issuer, request_uri, public_key, extra_public_keys, team, api_version, old_issuers, replaced_by FROM idp WHERE idp = ?" + +-- | Find 'IdPId' without team. Search both `issuer_idp_v2` and `issuer_idp`; in the former, +-- make sure the result is unique (no two IdPs for two different teams). +getIdPIdByIssuerWithoutTeam :: + (HasCallStack, MonadClient m) => + SAML.Issuer -> + m (GetIdPResult SAML.IdPId) +getIdPIdByIssuerWithoutTeam issuer = do + (runIdentity <$$> retry x1 (query selv2 $ params LocalQuorum (Identity issuer))) >>= \case + [] -> + (runIdentity <$$> retry x1 (query1 sel $ params LocalQuorum (Identity issuer))) >>= \case + Just idpid -> pure $ GetIdPFound idpid + Nothing -> pure GetIdPNotFound + [idpid] -> + pure $ GetIdPFound idpid + idpids@(_ : _ : _) -> + pure $ GetIdPNonUnique idpids + where + sel :: PrepQuery R (Identity SAML.Issuer) (Identity SAML.IdPId) + sel = "SELECT idp FROM issuer_idp WHERE issuer = ?" + + selv2 :: PrepQuery R (Identity SAML.Issuer) (Identity SAML.IdPId) + selv2 = "SELECT idp FROM issuer_idp_v2 WHERE issuer = ?" + +getIdPIdByIssuerWithTeam :: + (HasCallStack, MonadClient m) => + SAML.Issuer -> + TeamId -> + m (Maybe SAML.IdPId) +getIdPIdByIssuerWithTeam issuer tid = do + runIdentity <$$> retry x1 (query1 sel $ params LocalQuorum (issuer, tid)) + where + sel :: PrepQuery R (SAML.Issuer, TeamId) (Identity SAML.IdPId) + sel = "SELECT idp FROM issuer_idp_v2 WHERE issuer = ? and team = ?" + +getIdPConfigsByTeam :: + (HasCallStack, MonadClient m) => + TeamId -> + m [IdP] +getIdPConfigsByTeam team = do + idpids <- runIdentity <$$> retry x1 (query sel $ params LocalQuorum (Identity team)) + catMaybes <$> mapM getIdPConfig idpids + where + sel :: PrepQuery R (Identity TeamId) (Identity SAML.IdPId) + sel = "SELECT idp FROM team_idp WHERE team = ?" + +deleteIdPConfig :: + (HasCallStack, MonadClient m) => + SAML.IdPId -> + SAML.Issuer -> + TeamId -> + m () +deleteIdPConfig idp issuer team = retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + addPrepQuery delDefaultIdp (Identity idp) + addPrepQuery delIdp (Identity idp) + addPrepQuery delIssuerIdp (Identity issuer) + addPrepQuery delIssuerIdpV2 (Identity issuer) + addPrepQuery delTeamIdp (team, idp) + where + delDefaultIdp :: PrepQuery W (Identity SAML.IdPId) () + delDefaultIdp = "DELETE FROM default_idp WHERE partition_key_always_default = 'default' AND idp = ?" + + delIdp :: PrepQuery W (Identity SAML.IdPId) () + delIdp = "DELETE FROM idp WHERE idp = ?" + + delIssuerIdp :: PrepQuery W (Identity SAML.Issuer) () + delIssuerIdp = "DELETE FROM issuer_idp WHERE issuer = ?" + + delIssuerIdpV2 :: PrepQuery W (Identity SAML.Issuer) () + delIssuerIdpV2 = "DELETE FROM issuer_idp_v2 WHERE issuer = ?" + + delTeamIdp :: PrepQuery W (TeamId, SAML.IdPId) () + delTeamIdp = "DELETE FROM team_idp WHERE team = ? and idp = ?" + +-- | See also: test case @"{set,clear}ReplacedBy"@ in integration tests ("Test.Spar.DataSpec"). +setReplacedBy :: + (HasCallStack, MonadClient m) => + Replaced -> + Replacing -> + m () +setReplacedBy (Replaced old) (Replacing new) = do + retry x5 . write ins $ params LocalQuorum (new, old) + where + ins :: PrepQuery W (SAML.IdPId, SAML.IdPId) () + ins = "UPDATE idp SET replaced_by = ? WHERE idp = ?" + +-- | See also: 'setReplacedBy'. +clearReplacedBy :: + (HasCallStack, MonadClient m) => + Replaced -> + m () +clearReplacedBy (Replaced old) = do + retry x5 . write ins $ params LocalQuorum (Identity old) + where + ins :: PrepQuery W (Identity SAML.IdPId) () + ins = "UPDATE idp SET replaced_by = null WHERE idp = ?" diff --git a/services/spar/src/Spar/Sem/IdP/Mem.hs b/services/spar/src/Spar/Sem/IdP/Mem.hs index 0eb1603fa25..2ca37f90a14 100644 --- a/services/spar/src/Spar/Sem/IdP/Mem.hs +++ b/services/spar/src/Spar/Sem/IdP/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdP.Mem (idPToMem, TypedState) where import Control.Lens ((.~), (^.)) diff --git a/services/spar/src/Spar/Sem/IdP/Spec.hs b/services/spar/src/Spar/Sem/IdP/Spec.hs index d561ebc28ff..a4623be94bf 100644 --- a/services/spar/src/Spar/Sem/IdP/Spec.hs +++ b/services/spar/src/Spar/Sem/IdP/Spec.hs @@ -4,6 +4,23 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdP.Spec (propsForInterpreter) where import Control.Arrow diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore.hs index 5b000899378..d7c714baad3 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdPRawMetadataStore where import Imports diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Cassandra.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Cassandra.hs index 08ea88fdda9..ec9c8699371 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Cassandra.hs @@ -1,9 +1,29 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdPRawMetadataStore.Cassandra where -import Cassandra +import Cassandra as Cas +import Control.Lens +import Data.String.Conversions import Imports import Polysemy -import qualified Spar.Data as Data +import qualified SAML2.WebSSO as SAML +import Spar.Data.Instances () import Spar.Sem.IdPRawMetadataStore idpRawMetadataStoreToCassandra :: @@ -14,6 +34,36 @@ idpRawMetadataStoreToCassandra :: idpRawMetadataStoreToCassandra = interpret $ embed @m . \case - Store i t -> Data.storeIdPRawMetadata i t - Get i -> Data.getIdPRawMetadata i - Delete i -> Data.deleteIdPRawMetadata i + Store i t -> storeIdPRawMetadata i t + Get i -> getIdPRawMetadata i + Delete i -> deleteIdPRawMetadata i + +storeIdPRawMetadata :: + (HasCallStack, MonadClient m) => + SAML.IdPId -> + ST -> + m () +storeIdPRawMetadata idp raw = retry x5 . write ins $ params LocalQuorum (idp, raw) + where + ins :: PrepQuery W (SAML.IdPId, ST) () + ins = "INSERT INTO idp_raw_metadata (id, metadata) VALUES (?, ?)" + +getIdPRawMetadata :: + (HasCallStack, MonadClient m) => + SAML.IdPId -> + m (Maybe ST) +getIdPRawMetadata idp = + runIdentity + <$$> (retry x1 . query1 sel $ params LocalQuorum (Identity idp)) + where + sel :: PrepQuery R (Identity SAML.IdPId) (Identity ST) + sel = "SELECT metadata FROM idp_raw_metadata WHERE id = ?" + +deleteIdPRawMetadata :: + (HasCallStack, MonadClient m) => + SAML.IdPId -> + m () +deleteIdPRawMetadata idp = retry x5 . write del $ params LocalQuorum (Identity idp) + where + del :: PrepQuery W (Identity SAML.IdPId) () + del = "DELETE FROM idp_raw_metadata WHERE id = ?" diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs index 5956019273a..ace943c0a3e 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdPRawMetadataStore.Mem (idpRawMetadataStoreToMem, RawState) where import qualified Data.Map as M diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs index 181aec23304..f55560cf769 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs @@ -1,6 +1,23 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.IdPRawMetadataStore.Spec (propsForInterpreter) where import Imports diff --git a/services/spar/src/Spar/Sem/Logger.hs b/services/spar/src/Spar/Sem/Logger.hs index d8680c2c314..f273882c39e 100644 --- a/services/spar/src/Spar/Sem/Logger.hs +++ b/services/spar/src/Spar/Sem/Logger.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Logger ( module Spar.Sem.Logger, SAML.Level (..), diff --git a/services/spar/src/Spar/Sem/Logger/TinyLog.hs b/services/spar/src/Spar/Sem/Logger/TinyLog.hs index 1b8baf0d958..1e6398ac9d0 100644 --- a/services/spar/src/Spar/Sem/Logger/TinyLog.hs +++ b/services/spar/src/Spar/Sem/Logger/TinyLog.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Logger.TinyLog (loggerToTinyLog, stringLoggerToTinyLog, toLevel, fromLevel) where import Imports diff --git a/services/spar/src/Spar/Sem/Now.hs b/services/spar/src/Spar/Sem/Now.hs index 883eb8d44cf..4ae386d1894 100644 --- a/services/spar/src/Spar/Sem/Now.hs +++ b/services/spar/src/Spar/Sem/Now.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Now where import Imports diff --git a/services/spar/src/Spar/Sem/Now/IO.hs b/services/spar/src/Spar/Sem/Now/IO.hs index 74f75f738b8..5332de646c4 100644 --- a/services/spar/src/Spar/Sem/Now/IO.hs +++ b/services/spar/src/Spar/Sem/Now/IO.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Now.IO where import Imports diff --git a/services/spar/src/Spar/Sem/Now/Input.hs b/services/spar/src/Spar/Sem/Now/Input.hs index 738424f9552..f425f5cfcf8 100644 --- a/services/spar/src/Spar/Sem/Now/Input.hs +++ b/services/spar/src/Spar/Sem/Now/Input.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Now.Input where import Imports diff --git a/services/spar/src/Spar/Sem/Now/Spec.hs b/services/spar/src/Spar/Sem/Now/Spec.hs index f7fab8c9d1f..a8522881ad3 100644 --- a/services/spar/src/Spar/Sem/Now/Spec.hs +++ b/services/spar/src/Spar/Sem/Now/Spec.hs @@ -1,6 +1,23 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Now.Spec (propsForInterpreter) where import Imports diff --git a/services/spar/src/Spar/Sem/Random.hs b/services/spar/src/Spar/Sem/Random.hs index d3de55f3851..e89b540f05f 100644 --- a/services/spar/src/Spar/Sem/Random.hs +++ b/services/spar/src/Spar/Sem/Random.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Random where import Data.Id (ScimTokenId) diff --git a/services/spar/src/Spar/Sem/Random/IO.hs b/services/spar/src/Spar/Sem/Random/IO.hs index 5188b7a146b..f3a6b553f52 100644 --- a/services/spar/src/Spar/Sem/Random/IO.hs +++ b/services/spar/src/Spar/Sem/Random/IO.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Random.IO where import Data.Id (randomId) diff --git a/services/spar/src/Spar/Sem/Reporter.hs b/services/spar/src/Spar/Sem/Reporter.hs index b0381521110..cb988ca2d15 100644 --- a/services/spar/src/Spar/Sem/Reporter.hs +++ b/services/spar/src/Spar/Sem/Reporter.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Reporter where import Imports diff --git a/services/spar/src/Spar/Sem/Reporter/Wai.hs b/services/spar/src/Spar/Sem/Reporter/Wai.hs index 548be65b329..100934b3687 100644 --- a/services/spar/src/Spar/Sem/Reporter/Wai.hs +++ b/services/spar/src/Spar/Sem/Reporter/Wai.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.Reporter.Wai where import Imports diff --git a/services/spar/src/Spar/Sem/SAML2.hs b/services/spar/src/Spar/Sem/SAML2.hs index ae5007e9709..ece4d90101f 100644 --- a/services/spar/src/Spar/Sem/SAML2.hs +++ b/services/spar/src/Spar/Sem/SAML2.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SAML2 where import Data.Id (TeamId) diff --git a/services/spar/src/Spar/Sem/SAML2/Library.hs b/services/spar/src/Spar/Sem/SAML2/Library.hs index 9c8be48238e..d6f331e4edc 100644 --- a/services/spar/src/Spar/Sem/SAML2/Library.hs +++ b/services/spar/src/Spar/Sem/SAML2/Library.hs @@ -2,6 +2,23 @@ {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SAML2.Library (saml2ToSaml2WebSso) where import qualified Control.Monad.Catch as Catch diff --git a/services/spar/src/Spar/Sem/SAMLUserStore.hs b/services/spar/src/Spar/Sem/SAMLUserStore.hs index 4b8dd379d63..8c867dac2a2 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SAMLUserStore where import Data.Id diff --git a/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs b/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs index c2711056aed..38b8a4db47f 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs @@ -1,16 +1,37 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SAMLUserStore.Cassandra where -import Cassandra +import Cassandra as Cas +import Control.Lens import qualified Control.Monad.Catch as Catch -import Data.String.Conversions (cs) +import Control.Monad.Except +import Data.Id +import Data.String.Conversions import Imports import Polysemy import Polysemy.Error import Polysemy.Final -import qualified SAML2.WebSSO.Error as SAML +import qualified SAML2.WebSSO as SAML import qualified Spar.Data as Data +import Spar.Data.Instances () import Spar.Error import Spar.Sem.SAMLUserStore @@ -22,13 +43,14 @@ samlUserStoreToCassandra :: samlUserStoreToCassandra = interpret $ embed . \case - Insert ur uid -> Data.insertSAMLUser ur uid - Get ur -> Data.getSAMLUser ur - GetAnyByIssuer is -> Data.getSAMLAnyUserByIssuer is - GetSomeByIssuer is -> Data.getSAMLSomeUsersByIssuer is - DeleteByIssuer is -> Data.deleteSAMLUsersByIssuer is - Delete uid ur -> Data.deleteSAMLUser uid ur + Insert ur uid -> insertSAMLUser ur uid + Get ur -> getSAMLUser ur + GetAnyByIssuer is -> getSAMLAnyUserByIssuer is + GetSomeByIssuer is -> getSAMLSomeUsersByIssuer is + DeleteByIssuer is -> deleteSAMLUsersByIssuer is + Delete uid ur -> deleteSAMLUser uid ur +-- TODO(sandy): move me interpretClientToIO :: Members '[Error SparError, Final IO] r => ClientState -> @@ -40,3 +62,89 @@ interpretClientToIO ctx = interpret $ \case st <- getInitialStateS handler' <- bindS $ throw @SparError . SAML.CustomError . SparCassandraError . cs . show @SomeException pure $ action' `Catch.catch` \e -> handler' $ e <$ st + +-- | Add new user. If user with this 'SAML.UserId' exists, overwrite it. +insertSAMLUser :: (HasCallStack, MonadClient m) => SAML.UserRef -> UserId -> m () +insertSAMLUser (SAML.UserRef tenant subject) uid = retry x5 . write ins $ params LocalQuorum (tenant, Data.normalizeQualifiedNameId subject, subject, uid) + where + ins :: PrepQuery W (SAML.Issuer, Data.NormalizedUNameID, SAML.NameID, UserId) () + ins = "INSERT INTO user_v2 (issuer, normalized_uname_id, sso_id, uid) VALUES (?, ?, ?, ?)" + +-- | Sometimes we only need to know if it's none or more, so this function returns the first one. +getSAMLAnyUserByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m (Maybe UserId) +getSAMLAnyUserByIssuer issuer = + runIdentity + <$$> (retry x1 . query1 sel $ params LocalQuorum (Identity issuer)) + where + sel :: PrepQuery R (Identity SAML.Issuer) (Identity UserId) + sel = "SELECT uid FROM user_v2 WHERE issuer = ? LIMIT 1" + +-- | Sometimes (eg., for IdP deletion), we can start anywhere with deleting all users in an +-- IdP, and if we don't get all users we just try again when we're done with these. +getSAMLSomeUsersByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m [(SAML.UserRef, UserId)] +getSAMLSomeUsersByIssuer issuer = + (_1 %~ SAML.UserRef issuer) + <$$> (retry x1 . query sel $ params LocalQuorum (Identity issuer)) + where + sel :: PrepQuery R (Identity SAML.Issuer) (SAML.NameID, UserId) + sel = "SELECT sso_id, uid FROM user_v2 WHERE issuer = ? LIMIT 2000" + +-- | Lookup a brig 'UserId' by IdP issuer and NameID. +-- +-- NB: It is not allowed for two distinct wire users from two different teams to have the same +-- 'UserRef'. RATIONALE: this allows us to implement 'getSAMLUser' without adding 'TeamId' to +-- 'UserRef' (which in turn would break the (admittedly leaky) abstarctions of saml2-web-sso). +getSAMLUser :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) +getSAMLUser uref = do + mbUid <- getSAMLUserNew uref + case mbUid of + Nothing -> migrateLegacy uref + Just uid -> pure $ Just uid + where + getSAMLUserNew :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) + getSAMLUserNew (SAML.UserRef tenant subject) = + runIdentity + <$$> (retry x1 . query1 sel $ params LocalQuorum (tenant, Data.normalizeQualifiedNameId subject)) + where + sel :: PrepQuery R (SAML.Issuer, Data.NormalizedUNameID) (Identity UserId) + sel = "SELECT uid FROM user_v2 WHERE issuer = ? AND normalized_uname_id = ?" + + migrateLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) + migrateLegacy uref' = do + mbUid <- getSAMLUserLegacy uref' + for mbUid $ \uid -> do + insertSAMLUser uref' uid + pure uid + + getSAMLUserLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m (Maybe UserId) + getSAMLUserLegacy (SAML.UserRef tenant subject) = + runIdentity + <$$> (retry x1 . query1 sel $ params LocalQuorum (tenant, subject)) + where + sel :: PrepQuery R (SAML.Issuer, SAML.NameID) (Identity UserId) + sel = "SELECT uid FROM user WHERE issuer = ? AND sso_id = ?" + +deleteSAMLUsersByIssuer :: (HasCallStack, MonadClient m) => SAML.Issuer -> m () +deleteSAMLUsersByIssuer issuer = retry x5 . write del $ params LocalQuorum (Identity issuer) + where + del :: PrepQuery W (Identity SAML.Issuer) () + del = "DELETE FROM user_v2 WHERE issuer = ?" + +deleteSAMLUser :: (HasCallStack, MonadClient m) => UserId -> SAML.UserRef -> m () +deleteSAMLUser uid uref = do + muidUref <- getSAMLUser uref + for_ muidUref $ \uidUref -> + when (uidUref == uid) $ do + deleteSAMLUserLegacy uref + deleteSAMLUserNew uref + where + deleteSAMLUserNew :: (HasCallStack, MonadClient m) => SAML.UserRef -> m () + deleteSAMLUserNew (SAML.UserRef tenant subject) = retry x5 . write del $ params LocalQuorum (tenant, Data.normalizeQualifiedNameId subject) + where + del :: PrepQuery W (SAML.Issuer, Data.NormalizedUNameID) () + del = "DELETE FROM user_v2 WHERE issuer = ? AND normalized_uname_id = ?" + deleteSAMLUserLegacy :: (HasCallStack, MonadClient m) => SAML.UserRef -> m () + deleteSAMLUserLegacy (SAML.UserRef tenant subject) = retry x5 . write del $ params LocalQuorum (tenant, subject) + where + del :: PrepQuery W (SAML.Issuer, SAML.NameID) () + del = "DELETE FROM user WHERE issuer = ? AND sso_id = ?" diff --git a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs index 26ae7ab48ae..2ff916517b1 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SAMLUserStore.Mem where import Control.Lens (view) diff --git a/services/spar/src/Spar/Sem/SamlProtocolSettings.hs b/services/spar/src/Spar/Sem/SamlProtocolSettings.hs index ea545706614..f2bbc33bb57 100644 --- a/services/spar/src/Spar/Sem/SamlProtocolSettings.hs +++ b/services/spar/src/Spar/Sem/SamlProtocolSettings.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SamlProtocolSettings where import Data.Id (TeamId) diff --git a/services/spar/src/Spar/Sem/SamlProtocolSettings/Servant.hs b/services/spar/src/Spar/Sem/SamlProtocolSettings/Servant.hs index 138ba41640f..0407b76a0e3 100644 --- a/services/spar/src/Spar/Sem/SamlProtocolSettings/Servant.hs +++ b/services/spar/src/Spar/Sem/SamlProtocolSettings/Servant.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -Wno-orphans #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.SamlProtocolSettings.Servant where import Imports diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore.hs index 717daa58b8a..29a1b1d9dbe 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimExternalIdStore where import Data.Id (TeamId, UserId) diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Cassandra.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Cassandra.hs index e2d9ef0274b..02549c5f826 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Cassandra.hs @@ -1,10 +1,28 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimExternalIdStore.Cassandra where +import Brig.Types.Common (Email, fromEmail) import Cassandra +import Data.Id import Imports import Polysemy -import qualified Spar.Data as Data -import Spar.Sem.ScimExternalIdStore +import Spar.Sem.ScimExternalIdStore (ScimExternalIdStore (..)) scimExternalIdStoreToCassandra :: forall m r a. @@ -14,6 +32,33 @@ scimExternalIdStoreToCassandra :: scimExternalIdStoreToCassandra = interpret $ embed @m . \case - Insert tid em uid -> Data.insertScimExternalId tid em uid - Lookup tid em -> Data.lookupScimExternalId tid em - Delete tid em -> Data.deleteScimExternalId tid em + Insert tid em uid -> insertScimExternalId tid em uid + Lookup tid em -> lookupScimExternalId tid em + Delete tid em -> deleteScimExternalId tid em + +-- | If a scim externalId does not have an associated saml idp issuer, it cannot be stored in +-- table @spar.user@. In those cases, and only in those cases, we store the mapping to +-- 'UserId' here. (Note that since there is no associated IdP, the externalId is required to +-- be an email address, so we enforce that in the type signature, even though we only use it +-- as a 'Text'.) +insertScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> UserId -> m () +insertScimExternalId tid (fromEmail -> email) uid = + retry x5 . write insert $ params LocalQuorum (tid, email, uid) + where + insert :: PrepQuery W (TeamId, Text, UserId) () + insert = "INSERT INTO scim_external (team, external_id, user) VALUES (?, ?, ?)" + +-- | The inverse of 'insertScimExternalId'. +lookupScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> m (Maybe UserId) +lookupScimExternalId tid (fromEmail -> email) = runIdentity <$$> (retry x1 . query1 sel $ params LocalQuorum (tid, email)) + where + sel :: PrepQuery R (TeamId, Text) (Identity UserId) + sel = "SELECT user FROM scim_external WHERE team = ? and external_id = ?" + +-- | The other inverse of 'insertScimExternalId' :). +deleteScimExternalId :: (HasCallStack, MonadClient m) => TeamId -> Email -> m () +deleteScimExternalId tid (fromEmail -> email) = + retry x5 . write delete $ params LocalQuorum (tid, email) + where + delete :: PrepQuery W (TeamId, Text) () + delete = "DELETE FROM scim_external WHERE team = ? and external_id = ?" diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs index efbbbcdba09..2f57d3cfa5b 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimExternalIdStore.Mem where import Data.Id (TeamId, UserId) diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs index 57c2a1742e9..79157b5e268 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs @@ -1,6 +1,23 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimExternalIdStore.Spec (propsForInterpreter) where import Data.Id diff --git a/services/spar/src/Spar/Sem/ScimTokenStore.hs b/services/spar/src/Spar/Sem/ScimTokenStore.hs index f2a35a4d422..0cafcfd2997 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimTokenStore where import Data.Id @@ -8,7 +25,7 @@ import Wire.API.User.Scim data ScimTokenStore m a where Insert :: ScimToken -> ScimTokenInfo -> ScimTokenStore m () Lookup :: ScimToken -> ScimTokenStore m (Maybe ScimTokenInfo) - GetByTeam :: TeamId -> ScimTokenStore m [ScimTokenInfo] + LookupByTeam :: TeamId -> ScimTokenStore m [ScimTokenInfo] Delete :: TeamId -> ScimTokenId -> ScimTokenStore m () DeleteByTeam :: TeamId -> ScimTokenStore m () diff --git a/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs b/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs index a79bbc3e948..4b9b7a1ee8c 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs @@ -1,12 +1,39 @@ +{-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimTokenStore.Cassandra where -import Cassandra +import Cassandra as Cas +import Control.Arrow (Arrow ((&&&))) +import Control.Lens +import Control.Monad.Except +import Data.Id +import Data.Time import Imports import Polysemy -import qualified Spar.Data as Data +import qualified SAML2.WebSSO as SAML +import Spar.Data.Instances () import Spar.Sem.ScimTokenStore +import Text.RawString.QQ +import Wire.API.User.Scim +import qualified Prelude scimTokenStoreToCassandra :: forall m r a. @@ -16,8 +43,171 @@ scimTokenStoreToCassandra :: scimTokenStoreToCassandra = interpret $ embed @m . \case - Insert st sti -> Data.insertScimToken st sti - Lookup st -> Data.lookupScimToken st - GetByTeam tid -> Data.getScimTokens tid - Delete tid ur -> Data.deleteScimToken tid ur - DeleteByTeam tid -> Data.deleteTeamScimTokens tid + Insert st sti -> insertScimToken st sti + Lookup st -> lookupScimToken st + LookupByTeam tid -> getScimTokens tid + Delete tid ur -> deleteScimToken tid ur + DeleteByTeam tid -> deleteTeamScimTokens tid + +---------------------------------------------------------------------- +-- SCIM auth +-- +-- docs/developer/scim/storage.md {#DevScimStorageTokens} + +-- | Add a new SCIM provisioning token. The token should be random and +-- generated by the backend, not by the user. +insertScimToken :: + (HasCallStack, MonadClient m) => + ScimToken -> + ScimTokenInfo -> + m () +insertScimToken token ScimTokenInfo {..} = retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + let tokenHash = hashScimToken token + addPrepQuery insByToken (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) + addPrepQuery insByTeam (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) + +insByToken, insByTeam :: PrepQuery W ScimTokenRow () +insByToken = + [r| + INSERT INTO team_provisioning_by_token + (token_, team, id, created_at, idp, descr) + VALUES (?, ?, ?, ?, ?, ?) + |] +insByTeam = + [r| + INSERT INTO team_provisioning_by_team + (token_, team, id, created_at, idp, descr) + VALUES (?, ?, ?, ?, ?, ?) + |] + +scimTokenLookupKey :: ScimTokenRow -> ScimTokenLookupKey +scimTokenLookupKey (key, _, _, _, _, _) = key + +-- | Check whether a token exists and if yes, what team and IdP are +-- associated with it. +lookupScimToken :: + (HasCallStack, MonadClient m) => + ScimToken -> + m (Maybe ScimTokenInfo) +lookupScimToken token = do + let tokenHash = hashScimToken token + rows <- retry x1 . query sel $ params LocalQuorum (tokenHash, token) + case fmap (scimTokenLookupKey &&& Prelude.id) rows of + [(ScimTokenLookupKeyHashed _, row)] -> + pure (Just (fromScimTokenRow row)) + [(ScimTokenLookupKeyPlaintext plain, row)] -> + convert plain row + [(ScimTokenLookupKeyHashed _, _), (ScimTokenLookupKeyPlaintext plain, row)] -> + convert plain row + [(ScimTokenLookupKeyPlaintext plain, row), (ScimTokenLookupKeyHashed _, _)] -> + convert plain row + _ -> pure Nothing + where + sel :: PrepQuery R (ScimTokenHash, ScimToken) ScimTokenRow + sel = + [r| + SELECT token_, team, id, created_at, idp, descr + FROM team_provisioning_by_token WHERE token_ in (?, ?) + |] + + convert :: MonadClient m => ScimToken -> ScimTokenRow -> m (Maybe ScimTokenInfo) + convert plain row = do + let tokenInfo = fromScimTokenRow row + connvertPlaintextToken plain tokenInfo + pure (Just tokenInfo) + +connvertPlaintextToken :: + (HasCallStack, MonadClient m) => + ScimToken -> + ScimTokenInfo -> + m () +connvertPlaintextToken token ScimTokenInfo {..} = retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + let tokenHash = hashScimToken token + -- enter by new lookup key + addPrepQuery insByToken (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) + -- update info table + addPrepQuery insByTeam (ScimTokenLookupKeyHashed tokenHash, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) + -- remove old lookup key + addPrepQuery delByTokenLookup (Identity (ScimTokenLookupKeyPlaintext token)) + +-- | List all tokens associated with a team, in the order of their creation. +getScimTokens :: + (HasCallStack, MonadClient m) => + TeamId -> + m [ScimTokenInfo] +getScimTokens team = do + -- We don't need pagination here because the limit should be pretty low + -- (e.g. 16). If the limit grows, we might have to introduce pagination. + rows <- retry x1 . query sel $ params LocalQuorum (Identity team) + pure $ sortOn stiCreatedAt $ map fromScimTokenRow rows + where + sel :: PrepQuery R (Identity TeamId) ScimTokenRow + sel = + [r| + SELECT token_, team, id, created_at, idp, descr + FROM team_provisioning_by_team WHERE team = ? + |] + +-- | Delete a token. +deleteScimToken :: + (HasCallStack, MonadClient m) => + TeamId -> + ScimTokenId -> + m () +deleteScimToken team tokenid = do + mbToken <- retry x1 . query1 selById $ params LocalQuorum (team, tokenid) + retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + addPrepQuery delById (team, tokenid) + for_ mbToken $ \(Identity key) -> + addPrepQuery delByTokenLookup (Identity key) + where + selById :: PrepQuery R (TeamId, ScimTokenId) (Identity ScimTokenLookupKey) + selById = + [r| + SELECT token_ FROM team_provisioning_by_team + WHERE team = ? AND id = ? + |] + +delById :: PrepQuery W (TeamId, ScimTokenId) () +delById = + [r| + DELETE FROM team_provisioning_by_team + WHERE team = ? AND id = ? + |] + +delByTokenLookup :: PrepQuery W (Identity ScimTokenLookupKey) () +delByTokenLookup = + [r| + DELETE FROM team_provisioning_by_token + WHERE token_ = ? +|] + +-- | Delete all tokens belonging to a team. +deleteTeamScimTokens :: + (HasCallStack, MonadClient m) => + TeamId -> + m () +deleteTeamScimTokens team = do + tokens <- retry x5 $ query sel $ params LocalQuorum (Identity team) + retry x5 . batch $ do + setType BatchLogged + setConsistency LocalQuorum + addPrepQuery delByTeam (Identity team) + mapM_ (addPrepQuery delByTokenLookup) tokens + where + sel :: PrepQuery R (Identity TeamId) (Identity ScimTokenLookupKey) + sel = "SELECT token_ FROM team_provisioning_by_team WHERE team = ?" + delByTeam :: PrepQuery W (Identity TeamId) () + delByTeam = "DELETE FROM team_provisioning_by_team WHERE team = ?" + +type ScimTokenRow = (ScimTokenLookupKey, TeamId, ScimTokenId, UTCTime, Maybe SAML.IdPId, Text) + +fromScimTokenRow :: ScimTokenRow -> ScimTokenInfo +fromScimTokenRow (_, stiTeam, stiId, stiCreatedAt, stiIdP, stiDescr) = + ScimTokenInfo {..} diff --git a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs index b983208bef9..c815f823055 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimTokenStore.Mem where import qualified Data.Map as M @@ -16,6 +33,6 @@ scimTokenStoreToMem = (runState mempty .) $ reinterpret $ \case Insert st sti -> modify $ M.insert st sti Lookup st -> gets $ M.lookup st - GetByTeam tid -> gets $ filter ((== tid) . stiTeam) . M.elems + LookupByTeam tid -> gets $ filter ((== tid) . stiTeam) . M.elems Delete tid stid -> modify $ M.filter $ \sti -> not $ stiTeam sti == tid && stiId sti == stid DeleteByTeam tid -> modify $ M.filter (not . (== tid) . stiTeam) diff --git a/services/spar/src/Spar/Sem/ScimUserTimesStore.hs b/services/spar/src/Spar/Sem/ScimUserTimesStore.hs index 47554a8d001..61c940384d3 100644 --- a/services/spar/src/Spar/Sem/ScimUserTimesStore.hs +++ b/services/spar/src/Spar/Sem/ScimUserTimesStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimUserTimesStore where import Data.Id (UserId) diff --git a/services/spar/src/Spar/Sem/ScimUserTimesStore/Cassandra.hs b/services/spar/src/Spar/Sem/ScimUserTimesStore/Cassandra.hs index f8b68e8d059..ec8036eab92 100644 --- a/services/spar/src/Spar/Sem/ScimUserTimesStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/ScimUserTimesStore/Cassandra.hs @@ -1,15 +1,73 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimUserTimesStore.Cassandra where -import Cassandra (MonadClient) +import Cassandra as Cas +import Data.Id +import Data.Json.Util (UTCTimeMillis, toUTCTimeMillis) import Imports import Polysemy -import qualified Spar.Data as Data -import Spar.Sem.ScimUserTimesStore +import Spar.Sem.ScimUserTimesStore (ScimUserTimesStore (..)) +import Web.Scim.Schema.Common (WithId (..)) +import Web.Scim.Schema.Meta (Meta (..), WithMeta (..)) scimUserTimesStoreToCassandra :: forall m r a. (MonadClient m, Member (Embed m) r) => Sem (ScimUserTimesStore ': r) a -> Sem r a scimUserTimesStoreToCassandra = interpret $ embed @m . \case - Write wm -> Data.writeScimUserTimes wm - Read uid -> Data.readScimUserTimes uid - Delete uid -> Data.deleteScimUserTimes uid + Write wm -> writeScimUserTimes wm + Read uid -> readScimUserTimes uid + Delete uid -> deleteScimUserTimes uid + +---------------------------------------------------------------------- +-- SCIM user records +-- +-- docs/developer/scim/storage.md {#DevScimStorageUsers} + +-- | Store creation and last-update time from the scim metadata under a user id. +writeScimUserTimes :: (HasCallStack, MonadClient m) => WithMeta (WithId UserId a) -> m () +writeScimUserTimes (WithMeta meta (WithId uid _)) = + retry x5 . write ins $ + params + LocalQuorum + ( uid, + toUTCTimeMillis $ created meta, + toUTCTimeMillis $ lastModified meta + ) + where + ins :: PrepQuery W (UserId, UTCTimeMillis, UTCTimeMillis) () + ins = "INSERT INTO scim_user_times (uid, created_at, last_updated_at) VALUES (?, ?, ?)" + +-- | Read creation and last-update time from database for a given user id. +readScimUserTimes :: (HasCallStack, MonadClient m) => UserId -> m (Maybe (UTCTimeMillis, UTCTimeMillis)) +readScimUserTimes uid = do + retry x1 . query1 sel $ params LocalQuorum (Identity uid) + where + sel :: PrepQuery R (Identity UserId) (UTCTimeMillis, UTCTimeMillis) + sel = "SELECT created_at, last_updated_at FROM scim_user_times WHERE uid = ?" + +-- | Delete a SCIM user's access times by id. +-- You'll also want to ensure they are deleted in Brig and in the SAML Users table. +deleteScimUserTimes :: + (HasCallStack, MonadClient m) => + UserId -> + m () +deleteScimUserTimes uid = retry x5 . write del $ params LocalQuorum (Identity uid) + where + del :: PrepQuery W (Identity UserId) () + del = "DELETE FROM scim_user_times WHERE uid = ?" diff --git a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs index b9ed6216b42..1330f3938a3 100644 --- a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.ScimUserTimesStore.Mem where import Data.Id (UserId) diff --git a/services/spar/src/Spar/Sem/VerdictFormatStore.hs b/services/spar/src/Spar/Sem/VerdictFormatStore.hs index 5ceb826be34..648214edd7a 100644 --- a/services/spar/src/Spar/Sem/VerdictFormatStore.hs +++ b/services/spar/src/Spar/Sem/VerdictFormatStore.hs @@ -1,3 +1,20 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.VerdictFormatStore where import Data.Time (NominalDiffTime) diff --git a/services/spar/src/Spar/Sem/VerdictFormatStore/Cassandra.hs b/services/spar/src/Spar/Sem/VerdictFormatStore/Cassandra.hs index 707bc2dac87..aad436c686d 100644 --- a/services/spar/src/Spar/Sem/VerdictFormatStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/VerdictFormatStore/Cassandra.hs @@ -1,10 +1,35 @@ +{-# LANGUAGE RecordWildCards #-} + +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.VerdictFormatStore.Cassandra where -import Cassandra -import Imports hiding (MonadReader (..), Reader) +import Cassandra as Cas +import Control.Lens +import Control.Monad.Except +import Data.Time +import Imports import Polysemy -import qualified Spar.Data as Data +import Spar.Data +import Spar.Data.Instances (VerdictFormatCon, VerdictFormatRow, fromVerdictFormat, toVerdictFormat) import Spar.Sem.VerdictFormatStore +import URI.ByteString +import Wire.API.User.Saml verdictFormatStoreToCassandra :: forall m r a. @@ -12,5 +37,32 @@ verdictFormatStoreToCassandra :: Sem (VerdictFormatStore ': r) a -> Sem r a verdictFormatStoreToCassandra = interpret $ \case - Store ndt itla vf -> embed @m $ Data.storeVerdictFormat ndt itla vf - Get itla -> embed @m $ Data.getVerdictFormat itla + Store ndt itla vf -> embed @m $ storeVerdictFormat ndt itla vf + Get itla -> embed @m $ getVerdictFormat itla + +-- | First argument is the life expectancy of the request. (We store the verdict format for twice +-- as long. Reason: if there is some delay in processing a very old request, it would be bad for +-- error handling if we couldn't figure out where the error will land.) +storeVerdictFormat :: + (HasCallStack, MonadClient m) => + NominalDiffTime -> + AReqId -> + VerdictFormat -> + m () +storeVerdictFormat diffTime req (fromVerdictFormat -> (fmtCon, fmtMobSucc, fmtMobErr)) = do + let ttl = nominalDiffToSeconds diffTime * 2 + retry x5 . write cql $ params LocalQuorum (req, fmtCon, fmtMobSucc, fmtMobErr, ttl) + where + cql :: PrepQuery W (AReqId, VerdictFormatCon, Maybe URI, Maybe URI, Int32) () + cql = "INSERT INTO verdict (req, format_con, format_mobile_success, format_mobile_error) VALUES (?, ?, ?, ?) USING TTL ?" + +getVerdictFormat :: + (HasCallStack, MonadClient m) => + AReqId -> + m (Maybe VerdictFormat) +getVerdictFormat req = + (>>= toVerdictFormat) + <$> (retry x1 . query1 cql $ params LocalQuorum (Identity req)) + where + cql :: PrepQuery R (Identity AReqId) VerdictFormatRow + cql = "SELECT format_con, format_mobile_success, format_mobile_error FROM verdict WHERE req = ?" diff --git a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs index 73ce9311232..68457e971ab 100644 --- a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs +++ b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Spar.Sem.VerdictFormatStore.Mem where import qualified Data.Map as M diff --git a/services/spar/test-integration/Spec.hs b/services/spar/test-integration/Spec.hs index f74c9dc513e..45d66748a25 100644 --- a/services/spar/test-integration/Spec.hs +++ b/services/spar/test-integration/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/LoggingSpec.hs b/services/spar/test-integration/Test/LoggingSpec.hs index 3f6257afa5f..4b3a8d0875d 100644 --- a/services/spar/test-integration/Test/LoggingSpec.hs +++ b/services/spar/test-integration/Test/LoggingSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/MetricsSpec.hs b/services/spar/test-integration/Test/MetricsSpec.hs index 1ab0bb7fc8c..ab6a87136ba 100644 --- a/services/spar/test-integration/Test/MetricsSpec.hs +++ b/services/spar/test-integration/Test/MetricsSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/Spar/APISpec.hs b/services/spar/test-integration/Test/Spar/APISpec.hs index 7d73042cf0d..e8213c0bba6 100644 --- a/services/spar/test-integration/Test/Spar/APISpec.hs +++ b/services/spar/test-integration/Test/Spar/APISpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/Spar/AppSpec.hs b/services/spar/test-integration/Test/Spar/AppSpec.hs index 5f38b3830a3..e6bae3d4721 100644 --- a/services/spar/test-integration/Test/Spar/AppSpec.hs +++ b/services/spar/test-integration/Test/Spar/AppSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/Spar/DataSpec.hs b/services/spar/test-integration/Test/Spar/DataSpec.hs index fb0dae7045c..c29b402ba2d 100644 --- a/services/spar/test-integration/Test/Spar/DataSpec.hs +++ b/services/spar/test-integration/Test/Spar/DataSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free @@ -33,11 +33,11 @@ import Imports import Polysemy import SAML2.WebSSO as SAML import Spar.App as App -import Spar.Data as Data import Spar.Intra.BrigApp (veidFromUserSSOId) import qualified Spar.Sem.AReqIDStore as AReqIDStore import qualified Spar.Sem.AssIDStore as AssIDStore import qualified Spar.Sem.BindCookieStore as BindCookieStore +import Spar.Sem.IdP (GetIdPResult (..), Replaced (..), Replacing (..)) import qualified Spar.Sem.IdP as IdPEffect import qualified Spar.Sem.SAMLUserStore as SAMLUserStore import qualified Spar.Sem.ScimTokenStore as ScimTokenStore @@ -219,10 +219,10 @@ spec = do pendingWith "this requires a cql{,-io} upgrade. https://gitlab.com/twittner/cql-io/-/issues/7" idp1 <- makeTestIdP idp2 <- makeTestIdP - runSpar $ IdPEffect.setReplacedBy (Data.Replaced (idp1 ^. idpId)) (Data.Replacing (idp2 ^. idpId)) + runSpar $ IdPEffect.setReplacedBy (Replaced (idp1 ^. idpId)) (Replacing (idp2 ^. idpId)) idp1' <- runSpar $ IdPEffect.getConfig (idp1 ^. idpId) liftIO $ idp1' `shouldBe` Nothing - runSpar $ IdPEffect.clearReplacedBy (Data.Replaced (idp1 ^. idpId)) + runSpar $ IdPEffect.clearReplacedBy (Replaced (idp1 ^. idpId)) idp2' <- runSpar $ IdPEffect.getConfig (idp1 ^. idpId) liftIO $ idp2' `shouldBe` Nothing @@ -285,7 +285,7 @@ testDeleteTeam = it "cleans up all the right tables after deletion" $ do liftIO $ tokenInfo `shouldBe` Nothing -- The team from 'team_provisioning_by_team': do - tokens <- runSpar $ ScimTokenStore.getByTeam tid + tokens <- runSpar $ ScimTokenStore.lookupByTeam tid liftIO $ tokens `shouldBe` [] -- The users from 'user': do diff --git a/services/spar/test-integration/Test/Spar/Intra/BrigSpec.hs b/services/spar/test-integration/Test/Spar/Intra/BrigSpec.hs index e2e3ef3ce11..e429556fecf 100644 --- a/services/spar/test-integration/Test/Spar/Intra/BrigSpec.hs +++ b/services/spar/test-integration/Test/Spar/Intra/BrigSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/Spar/Scim/AuthSpec.hs b/services/spar/test-integration/Test/Spar/Scim/AuthSpec.hs index bee95ef5112..eb642d86d7a 100644 --- a/services/spar/test-integration/Test/Spar/Scim/AuthSpec.hs +++ b/services/spar/test-integration/Test/Spar/Scim/AuthSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs b/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs index 7b23d24b6b3..3296cea35a5 100644 --- a/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs +++ b/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util.hs b/services/spar/test-integration/Util.hs index 499edd743ad..40d093a537a 100644 --- a/services/spar/test-integration/Util.hs +++ b/services/spar/test-integration/Util.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util/Core.hs b/services/spar/test-integration/Util/Core.hs index a621f285f1d..ad1f2de7df9 100644 --- a/services/spar/test-integration/Util/Core.hs +++ b/services/spar/test-integration/Util/Core.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util/Email.hs b/services/spar/test-integration/Util/Email.hs index 3934098640e..30bab91ed80 100644 --- a/services/spar/test-integration/Util/Email.hs +++ b/services/spar/test-integration/Util/Email.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util/Invitation.hs b/services/spar/test-integration/Util/Invitation.hs index 061737e294b..88bacf04bb0 100644 --- a/services/spar/test-integration/Util/Invitation.hs +++ b/services/spar/test-integration/Util/Invitation.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util/Scim.hs b/services/spar/test-integration/Util/Scim.hs index 689fe08076c..2078964ae55 100644 --- a/services/spar/test-integration/Util/Scim.hs +++ b/services/spar/test-integration/Util/Scim.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test-integration/Util/Types.hs b/services/spar/test-integration/Util/Types.hs index 0349de1e31b..e5bfd19391e 100644 --- a/services/spar/test-integration/Util/Types.hs +++ b/services/spar/test-integration/Util/Types.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Arbitrary.hs b/services/spar/test/Arbitrary.hs index a5536460c6c..43143aa72f0 100644 --- a/services/spar/test/Arbitrary.hs +++ b/services/spar/test/Arbitrary.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Spec.hs b/services/spar/test/Spec.hs index 7b57431c0d0..c8c9b0bdc03 100644 --- a/services/spar/test/Spec.hs +++ b/services/spar/test/Spec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/APISpec.hs b/services/spar/test/Test/Spar/APISpec.hs index 2b2a432cc5c..807878f5d5c 100644 --- a/services/spar/test/Test/Spar/APISpec.hs +++ b/services/spar/test/Test/Spar/APISpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/DataSpec.hs b/services/spar/test/Test/Spar/DataSpec.hs index f044f672d54..45b73dc67cb 100644 --- a/services/spar/test/Test/Spar/DataSpec.hs +++ b/services/spar/test/Test/Spar/DataSpec.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/Intra/BrigSpec.hs b/services/spar/test/Test/Spar/Intra/BrigSpec.hs index d8f6e8edf5b..ee7c29934b4 100644 --- a/services/spar/test/Test/Spar/Intra/BrigSpec.hs +++ b/services/spar/test/Test/Spar/Intra/BrigSpec.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/Roundtrip/ByteString.hs b/services/spar/test/Test/Spar/Roundtrip/ByteString.hs index 12faed91183..e26d1b1faae 100644 --- a/services/spar/test/Test/Spar/Roundtrip/ByteString.hs +++ b/services/spar/test/Test/Spar/Roundtrip/ByteString.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/ScimSpec.hs b/services/spar/test/Test/Spar/ScimSpec.hs index 3eddfe3d129..b00f2d658cc 100644 --- a/services/spar/test/Test/Spar/ScimSpec.hs +++ b/services/spar/test/Test/Spar/ScimSpec.hs @@ -12,7 +12,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs b/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs index bc55fa5e410..32e703901f8 100644 --- a/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs +++ b/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs @@ -2,6 +2,23 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Spar.Sem.DefaultSsoCodeSpec where import Arbitrary () diff --git a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs index 2f8ce187cc8..36abf4ea039 100644 --- a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Spar.Sem.IdPRawMetadataStoreSpec where import Arbitrary () diff --git a/services/spar/test/Test/Spar/Sem/IdPSpec.hs b/services/spar/test/Test/Spar/Sem/IdPSpec.hs index 43232daa1b2..b262380fd85 100644 --- a/services/spar/test/Test/Spar/Sem/IdPSpec.hs +++ b/services/spar/test/Test/Spar/Sem/IdPSpec.hs @@ -4,6 +4,23 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Spar.Sem.IdPSpec where import Arbitrary () diff --git a/services/spar/test/Test/Spar/Sem/NowSpec.hs b/services/spar/test/Test/Spar/Sem/NowSpec.hs index b31dae84d42..38a9b9563fd 100644 --- a/services/spar/test/Test/Spar/Sem/NowSpec.hs +++ b/services/spar/test/Test/Spar/Sem/NowSpec.hs @@ -2,6 +2,23 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Spar.Sem.NowSpec where import Arbitrary () diff --git a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs index 964eb9a74f6..ec978251ea2 100644 --- a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs @@ -1,5 +1,22 @@ {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + module Test.Spar.Sem.ScimExternalIdStoreSpec where import Arbitrary () diff --git a/services/spar/test/Test/Spar/TypesSpec.hs b/services/spar/test/Test/Spar/TypesSpec.hs index 3d26d75346f..1d5cc73ab9a 100644 --- a/services/spar/test/Test/Spar/TypesSpec.hs +++ b/services/spar/test/Test/Spar/TypesSpec.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/stack.yaml b/stack.yaml index 15a73f6b123..392e1c4906b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -140,7 +140,7 @@ extra-deps: commit: 7546a1a25635ef65183e3d44c1052285e8401608 # master (Jul 21, 2016) - git: https://github.com/wireapp/hsaml2 - commit: b652ec6e69d1647e827cbee0fa290605ac09dc63 # https://github.com/wireapp/hsaml2/pull/9 (Feb 18, 2021) + commit: ef7b1de45ab0ea3a0a333b335579a02d8f88340c # (Jan 27, 2022) - git: https://github.com/wireapp/http-client commit: 9100baeddbd15d93dc58a826ae812dafff29d5fd # master (Jun 16, 2020) diff --git a/tools/api-simulations/lib/src/Network/Wire/Simulations.hs b/tools/api-simulations/lib/src/Network/Wire/Simulations.hs index f933ab94149..8bd692a6320 100644 --- a/tools/api-simulations/lib/src/Network/Wire/Simulations.hs +++ b/tools/api-simulations/lib/src/Network/Wire/Simulations.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/api-simulations/loadtest/src/Main.hs b/tools/api-simulations/loadtest/src/Main.hs index bca0c7eb2ae..f3918e50f7b 100644 --- a/tools/api-simulations/loadtest/src/Main.hs +++ b/tools/api-simulations/loadtest/src/Main.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/api-simulations/loadtest/src/Network/Wire/Simulations/LoadTest.hs b/tools/api-simulations/loadtest/src/Network/Wire/Simulations/LoadTest.hs index f8bbad1cac3..f7a386d8048 100644 --- a/tools/api-simulations/loadtest/src/Network/Wire/Simulations/LoadTest.hs +++ b/tools/api-simulations/loadtest/src/Network/Wire/Simulations/LoadTest.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/api-simulations/smoketest/src/Main.hs b/tools/api-simulations/smoketest/src/Main.hs index a44ab180fe3..84c1a758206 100644 --- a/tools/api-simulations/smoketest/src/Main.hs +++ b/tools/api-simulations/smoketest/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/api-simulations/smoketest/src/Network/Wire/Simulations/SmokeTest.hs b/tools/api-simulations/smoketest/src/Network/Wire/Simulations/SmokeTest.hs index 4fcd6d0acfb..dfc7b601be1 100644 --- a/tools/api-simulations/smoketest/src/Network/Wire/Simulations/SmokeTest.hs +++ b/tools/api-simulations/smoketest/src/Network/Wire/Simulations/SmokeTest.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/main/KibanaRaw.hs b/tools/bonanza/main/KibanaRaw.hs index ef4a938b882..469b676c36a 100644 --- a/tools/bonanza/main/KibanaRaw.hs +++ b/tools/bonanza/main/KibanaRaw.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/main/Kibanana.hs b/tools/bonanza/main/Kibanana.hs index d9954f5c35f..c09241ae566 100644 --- a/tools/bonanza/main/Kibanana.hs +++ b/tools/bonanza/main/Kibanana.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/main/Main.hs b/tools/bonanza/main/Main.hs index 2997435f141..2062fe2449a 100644 --- a/tools/bonanza/main/Main.hs +++ b/tools/bonanza/main/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Anon.hs b/tools/bonanza/src/Bonanza/Anon.hs index b82c3419619..48e453ae4eb 100644 --- a/tools/bonanza/src/Bonanza/Anon.hs +++ b/tools/bonanza/src/Bonanza/Anon.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/App.hs b/tools/bonanza/src/Bonanza/App.hs index 503341adc11..58ddd445378 100644 --- a/tools/bonanza/src/Bonanza/App.hs +++ b/tools/bonanza/src/Bonanza/App.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Geo.hs b/tools/bonanza/src/Bonanza/Geo.hs index 01ee61536ce..6d9e8784cb6 100644 --- a/tools/bonanza/src/Bonanza/Geo.hs +++ b/tools/bonanza/src/Bonanza/Geo.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Metrics.hs b/tools/bonanza/src/Bonanza/Metrics.hs index ba11f05403f..78826d2b6ad 100644 --- a/tools/bonanza/src/Bonanza/Metrics.hs +++ b/tools/bonanza/src/Bonanza/Metrics.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/CommonLog.hs b/tools/bonanza/src/Bonanza/Parser/CommonLog.hs index 4a4f1a8c8af..1974fa5d67b 100644 --- a/tools/bonanza/src/Bonanza/Parser/CommonLog.hs +++ b/tools/bonanza/src/Bonanza/Parser/CommonLog.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/IP.hs b/tools/bonanza/src/Bonanza/Parser/IP.hs index 768ed3dcb43..5e832d0e0f9 100644 --- a/tools/bonanza/src/Bonanza/Parser/IP.hs +++ b/tools/bonanza/src/Bonanza/Parser/IP.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Internal.hs b/tools/bonanza/src/Bonanza/Parser/Internal.hs index c71564c0228..f3ee2e57c34 100644 --- a/tools/bonanza/src/Bonanza/Parser/Internal.hs +++ b/tools/bonanza/src/Bonanza/Parser/Internal.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Journald.hs b/tools/bonanza/src/Bonanza/Parser/Journald.hs index eb25ed1be30..646b3b14d1a 100644 --- a/tools/bonanza/src/Bonanza/Parser/Journald.hs +++ b/tools/bonanza/src/Bonanza/Parser/Journald.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Netstrings.hs b/tools/bonanza/src/Bonanza/Parser/Netstrings.hs index d30e2bbd8ac..81b26baebab 100644 --- a/tools/bonanza/src/Bonanza/Parser/Netstrings.hs +++ b/tools/bonanza/src/Bonanza/Parser/Netstrings.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Nginz.hs b/tools/bonanza/src/Bonanza/Parser/Nginz.hs index 3d219fcf2c4..58314d5d6a6 100644 --- a/tools/bonanza/src/Bonanza/Parser/Nginz.hs +++ b/tools/bonanza/src/Bonanza/Parser/Nginz.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Rkt.hs b/tools/bonanza/src/Bonanza/Parser/Rkt.hs index f094ca22b16..62624e3753b 100644 --- a/tools/bonanza/src/Bonanza/Parser/Rkt.hs +++ b/tools/bonanza/src/Bonanza/Parser/Rkt.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Socklog.hs b/tools/bonanza/src/Bonanza/Parser/Socklog.hs index 8e6a8d0db85..f565d748644 100644 --- a/tools/bonanza/src/Bonanza/Parser/Socklog.hs +++ b/tools/bonanza/src/Bonanza/Parser/Socklog.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Svlogd.hs b/tools/bonanza/src/Bonanza/Parser/Svlogd.hs index ec6971dc0fc..c37a06f4255 100644 --- a/tools/bonanza/src/Bonanza/Parser/Svlogd.hs +++ b/tools/bonanza/src/Bonanza/Parser/Svlogd.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Time.hs b/tools/bonanza/src/Bonanza/Parser/Time.hs index 3493910c2d5..cbd5aac74dc 100644 --- a/tools/bonanza/src/Bonanza/Parser/Time.hs +++ b/tools/bonanza/src/Bonanza/Parser/Time.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Parser/Tinylog.hs b/tools/bonanza/src/Bonanza/Parser/Tinylog.hs index fce8c348f57..c5192b089fb 100644 --- a/tools/bonanza/src/Bonanza/Parser/Tinylog.hs +++ b/tools/bonanza/src/Bonanza/Parser/Tinylog.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Streaming/Binary.hs b/tools/bonanza/src/Bonanza/Streaming/Binary.hs index f5fa2fc2127..80500549a85 100644 --- a/tools/bonanza/src/Bonanza/Streaming/Binary.hs +++ b/tools/bonanza/src/Bonanza/Streaming/Binary.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Streaming/Kibana.hs b/tools/bonanza/src/Bonanza/Streaming/Kibana.hs index 46576aee03c..dc8f6830446 100644 --- a/tools/bonanza/src/Bonanza/Streaming/Kibana.hs +++ b/tools/bonanza/src/Bonanza/Streaming/Kibana.hs @@ -9,7 +9,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Streaming/Parser.hs b/tools/bonanza/src/Bonanza/Streaming/Parser.hs index a15f3cad653..da64a3d0e7a 100644 --- a/tools/bonanza/src/Bonanza/Streaming/Parser.hs +++ b/tools/bonanza/src/Bonanza/Streaming/Parser.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Streaming/Protobuf.hs b/tools/bonanza/src/Bonanza/Streaming/Protobuf.hs index 8511aaac86f..80de54d0997 100644 --- a/tools/bonanza/src/Bonanza/Streaming/Protobuf.hs +++ b/tools/bonanza/src/Bonanza/Streaming/Protobuf.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Streaming/Snappy.hs b/tools/bonanza/src/Bonanza/Streaming/Snappy.hs index 981605008c8..f197f5dea1d 100644 --- a/tools/bonanza/src/Bonanza/Streaming/Snappy.hs +++ b/tools/bonanza/src/Bonanza/Streaming/Snappy.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/src/Bonanza/Types.hs b/tools/bonanza/src/Bonanza/Types.hs index 2036d710e90..c4ee4670965 100644 --- a/tools/bonanza/src/Bonanza/Types.hs +++ b/tools/bonanza/src/Bonanza/Types.hs @@ -10,7 +10,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/test/unit/Main.hs b/tools/bonanza/test/unit/Main.hs index f6c62dad8ba..6d1edfc10a4 100644 --- a/tools/bonanza/test/unit/Main.hs +++ b/tools/bonanza/test/unit/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/test/unit/Test/Bonanza/Arbitrary.hs b/tools/bonanza/test/unit/Test/Bonanza/Arbitrary.hs index 71d321f74ca..a66050a48c9 100644 --- a/tools/bonanza/test/unit/Test/Bonanza/Arbitrary.hs +++ b/tools/bonanza/test/unit/Test/Bonanza/Arbitrary.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/test/unit/Test/Bonanza/Parser.hs b/tools/bonanza/test/unit/Test/Bonanza/Parser.hs index 755566974f1..80347baf72b 100644 --- a/tools/bonanza/test/unit/Test/Bonanza/Parser.hs +++ b/tools/bonanza/test/unit/Test/Bonanza/Parser.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/bonanza/test/unit/Test/Bonanza/Streaming.hs b/tools/bonanza/test/unit/Test/Bonanza/Streaming.hs index 4c17d7f8ca1..c1ce07b44e9 100644 --- a/tools/bonanza/test/unit/Test/Bonanza/Streaming.hs +++ b/tools/bonanza/test/unit/Test/Bonanza/Streaming.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/auto-whitelist/src/Main.hs b/tools/db/auto-whitelist/src/Main.hs index ca781521949..0129d1ffcdd 100644 --- a/tools/db/auto-whitelist/src/Main.hs +++ b/tools/db/auto-whitelist/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/auto-whitelist/src/Options.hs b/tools/db/auto-whitelist/src/Options.hs index 5fff7cdf246..7d4aef56009 100644 --- a/tools/db/auto-whitelist/src/Options.hs +++ b/tools/db/auto-whitelist/src/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/auto-whitelist/src/Work.hs b/tools/db/auto-whitelist/src/Work.hs index d79832dfc6e..b57456ebcce 100644 --- a/tools/db/auto-whitelist/src/Work.hs +++ b/tools/db/auto-whitelist/src/Work.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/billing-team-member-backfill/src/Main.hs b/tools/db/billing-team-member-backfill/src/Main.hs index c9909b95fe5..6811cf31544 100644 --- a/tools/db/billing-team-member-backfill/src/Main.hs +++ b/tools/db/billing-team-member-backfill/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/billing-team-member-backfill/src/Options.hs b/tools/db/billing-team-member-backfill/src/Options.hs index b3a56c458f9..ca3afd08024 100644 --- a/tools/db/billing-team-member-backfill/src/Options.hs +++ b/tools/db/billing-team-member-backfill/src/Options.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/billing-team-member-backfill/src/Work.hs b/tools/db/billing-team-member-backfill/src/Work.hs index 4d45abcc3b3..e0b80f62ae8 100644 --- a/tools/db/billing-team-member-backfill/src/Work.hs +++ b/tools/db/billing-team-member-backfill/src/Work.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/find-undead/src/Main.hs b/tools/db/find-undead/src/Main.hs index c3d7efd1399..96a9dbafb74 100644 --- a/tools/db/find-undead/src/Main.hs +++ b/tools/db/find-undead/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/find-undead/src/Options.hs b/tools/db/find-undead/src/Options.hs index b45adcd2627..93444cf1f4b 100644 --- a/tools/db/find-undead/src/Options.hs +++ b/tools/db/find-undead/src/Options.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/find-undead/src/Work.hs b/tools/db/find-undead/src/Work.hs index 7661bbd8fb3..cd3ff8a3474 100644 --- a/tools/db/find-undead/src/Work.hs +++ b/tools/db/find-undead/src/Work.hs @@ -4,7 +4,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/migrate-sso-feature-flag/src/Main.hs b/tools/db/migrate-sso-feature-flag/src/Main.hs index 79a65f255c8..e2fd21f4570 100644 --- a/tools/db/migrate-sso-feature-flag/src/Main.hs +++ b/tools/db/migrate-sso-feature-flag/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/migrate-sso-feature-flag/src/Options.hs b/tools/db/migrate-sso-feature-flag/src/Options.hs index b8f1dd18201..c2aca06cbc9 100644 --- a/tools/db/migrate-sso-feature-flag/src/Options.hs +++ b/tools/db/migrate-sso-feature-flag/src/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/migrate-sso-feature-flag/src/Work.hs b/tools/db/migrate-sso-feature-flag/src/Work.hs index 582f2fdf3bd..e62edb9aa21 100644 --- a/tools/db/migrate-sso-feature-flag/src/Work.hs +++ b/tools/db/migrate-sso-feature-flag/src/Work.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/move-team-generate/Main.hs b/tools/db/move-team/move-team-generate/Main.hs index 58e808a553b..3a48061f8c0 100644 --- a/tools/db/move-team/move-team-generate/Main.hs +++ b/tools/db/move-team/move-team-generate/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/move-team/Main.hs b/tools/db/move-team/move-team/Main.hs index d99794b84a2..1601a9ce3d7 100644 --- a/tools/db/move-team/move-team/Main.hs +++ b/tools/db/move-team/move-team/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/Common.hs b/tools/db/move-team/src/Common.hs index 2d79a203fb9..f3d685cf80d 100644 --- a/tools/db/move-team/src/Common.hs +++ b/tools/db/move-team/src/Common.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/Options.hs b/tools/db/move-team/src/Options.hs index c8bb1db329e..d5a7899873b 100644 --- a/tools/db/move-team/src/Options.hs +++ b/tools/db/move-team/src/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/ParseSchema.hs b/tools/db/move-team/src/ParseSchema.hs index 7d4299a8b2f..ac3952c6655 100644 --- a/tools/db/move-team/src/ParseSchema.hs +++ b/tools/db/move-team/src/ParseSchema.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/Schema.hs b/tools/db/move-team/src/Schema.hs index 6706e6ebee0..6e86bfec943 100644 --- a/tools/db/move-team/src/Schema.hs +++ b/tools/db/move-team/src/Schema.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/Types.hs b/tools/db/move-team/src/Types.hs index e103908cb73..44ec7d6dc6e 100644 --- a/tools/db/move-team/src/Types.hs +++ b/tools/db/move-team/src/Types.hs @@ -9,7 +9,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/move-team/src/Work.hs b/tools/db/move-team/src/Work.hs index cab4883b389..08b7584462d 100644 --- a/tools/db/move-team/src/Work.hs +++ b/tools/db/move-team/src/Work.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/repair-handles/repair-handles/Main.hs b/tools/db/repair-handles/repair-handles/Main.hs index bcb4a8bd82d..b02d257876e 100644 --- a/tools/db/repair-handles/repair-handles/Main.hs +++ b/tools/db/repair-handles/repair-handles/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/repair-handles/src/Options.hs b/tools/db/repair-handles/src/Options.hs index 50f19ed7f29..f52c8df597c 100644 --- a/tools/db/repair-handles/src/Options.hs +++ b/tools/db/repair-handles/src/Options.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/repair-handles/src/Types.hs b/tools/db/repair-handles/src/Types.hs index 9ca8a76d716..a7bf5ae220c 100644 --- a/tools/db/repair-handles/src/Types.hs +++ b/tools/db/repair-handles/src/Types.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/repair-handles/src/Work.hs b/tools/db/repair-handles/src/Work.hs index 3a014750375..86f95c576c6 100644 --- a/tools/db/repair-handles/src/Work.hs +++ b/tools/db/repair-handles/src/Work.hs @@ -18,7 +18,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/service-backfill/src/Main.hs b/tools/db/service-backfill/src/Main.hs index ea371b1e945..47ae6eb4043 100644 --- a/tools/db/service-backfill/src/Main.hs +++ b/tools/db/service-backfill/src/Main.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/service-backfill/src/Options.hs b/tools/db/service-backfill/src/Options.hs index 8cb2bbbcf12..4d975618cd5 100644 --- a/tools/db/service-backfill/src/Options.hs +++ b/tools/db/service-backfill/src/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/db/service-backfill/src/Work.hs b/tools/db/service-backfill/src/Work.hs index 99f7b856fed..a5636a1e6c6 100644 --- a/tools/db/service-backfill/src/Work.hs +++ b/tools/db/service-backfill/src/Work.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/makedeb/src/Main.hs b/tools/makedeb/src/Main.hs index 003adb5cff1..337f0c82189 100644 --- a/tools/makedeb/src/Main.hs +++ b/tools/makedeb/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/makedeb/src/System/MakeDeb.hs b/tools/makedeb/src/System/MakeDeb.hs index 6729bcfc71b..a58b514e5a8 100644 --- a/tools/makedeb/src/System/MakeDeb.hs +++ b/tools/makedeb/src/System/MakeDeb.hs @@ -5,7 +5,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/makedeb/src/System/MakeDeb/FileUtils.hs b/tools/makedeb/src/System/MakeDeb/FileUtils.hs index 1c7521249d9..fc2729ef4c8 100644 --- a/tools/makedeb/src/System/MakeDeb/FileUtils.hs +++ b/tools/makedeb/src/System/MakeDeb/FileUtils.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/rex/Main.hs b/tools/rex/Main.hs index 40b6848c548..70daf4d3358 100644 --- a/tools/rex/Main.hs +++ b/tools/rex/Main.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Main.hs b/tools/stern/src/Main.hs index 20e4d51bd33..58540a30ade 100644 --- a/tools/stern/src/Main.hs +++ b/tools/stern/src/Main.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/API.hs b/tools/stern/src/Stern/API.hs index 8aac06f7f20..1085e5e96b8 100644 --- a/tools/stern/src/Stern/API.hs +++ b/tools/stern/src/Stern/API.hs @@ -7,7 +7,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/API/Predicates.hs b/tools/stern/src/Stern/API/Predicates.hs index 5992d1254bb..eb0107ce350 100644 --- a/tools/stern/src/Stern/API/Predicates.hs +++ b/tools/stern/src/Stern/API/Predicates.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/App.hs b/tools/stern/src/Stern/App.hs index e5fd8e80382..1907faf80fa 100644 --- a/tools/stern/src/Stern/App.hs +++ b/tools/stern/src/Stern/App.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/Intra.hs b/tools/stern/src/Stern/Intra.hs index bdad751f68d..39cd68fa9f2 100644 --- a/tools/stern/src/Stern/Intra.hs +++ b/tools/stern/src/Stern/Intra.hs @@ -6,7 +6,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/Options.hs b/tools/stern/src/Stern/Options.hs index f1185c56e20..103d381a2cc 100644 --- a/tools/stern/src/Stern/Options.hs +++ b/tools/stern/src/Stern/Options.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/Swagger.hs b/tools/stern/src/Stern/Swagger.hs index 9ce1575f49d..b72d633f019 100644 --- a/tools/stern/src/Stern/Swagger.hs +++ b/tools/stern/src/Stern/Swagger.hs @@ -2,7 +2,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/tools/stern/src/Stern/Types.hs b/tools/stern/src/Stern/Types.hs index 3fc157ab118..221ee838ad0 100644 --- a/tools/stern/src/Stern/Types.hs +++ b/tools/stern/src/Stern/Types.hs @@ -8,7 +8,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free