forked from wireapp/wire-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wireapp:develop' into develop
- Loading branch information
Showing
94 changed files
with
973 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Services allowlist are blocked by 409 (mls-services-not-allowed) for teams with default protocol MLS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The `POST /clients` and `PUT /clients/:cid` endpoints support a new capability "consume-notifications" |
1 change: 1 addition & 0 deletions
1
changelog.d/2-features/WPB-11163-consume-notifications-capability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Clients can declare to be supporting a capability for consuming notifications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove unused invitation tables from brig. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
module Test.MLS.Services where | ||
|
||
import API.Brig | ||
import API.Common | ||
import API.GalleyInternal (patchTeamFeatureConfig) | ||
import SetupHelpers | ||
import Testlib.JSON | ||
import Testlib.Prelude | ||
|
||
testWhitelistUpdatePermissions :: (HasCallStack) => App () | ||
testWhitelistUpdatePermissions = do | ||
-- Create a team | ||
(owner, tid, []) <- createTeam OwnDomain 1 | ||
|
||
-- Create a team admin | ||
admin <- createTeamMemberWithRole owner tid "admin" | ||
|
||
-- Create a service | ||
email <- randomEmail | ||
provider <- make <$> setupProvider owner def {newProviderEmail = email} | ||
providerId <- provider %. "id" & asString | ||
service <- make <$> newService OwnDomain providerId def | ||
|
||
do | ||
-- Check that a random user can't add the service to the whitelist | ||
uid <- randomUser OwnDomain def | ||
serviceId <- service %. "id" & asString | ||
np <- | ||
make | ||
$ object | ||
[ "id" .= serviceId, | ||
"provider" .= providerId, | ||
"whitelisted" .= True | ||
] | ||
bindResponse (postServiceWhitelist uid tid np) $ \resp -> do | ||
resp.status `shouldMatchInt` 403 | ||
(resp.jsonBody %. "label") `shouldMatch` Just "insufficient-permissions" | ||
|
||
do | ||
-- Check that an admin can add the service to the whitelist | ||
serviceId <- service %. "id" & asString | ||
np <- | ||
make | ||
$ object | ||
[ "id" .= serviceId, | ||
"provider" .= providerId, | ||
"whitelisted" .= True | ||
] | ||
postServiceWhitelist admin tid np >>= assertStatus 200 | ||
|
||
-- set team's defaultProtocol to MLS | ||
mlsConfig <- | ||
make | ||
$ object | ||
[ "config" | ||
.= object | ||
[ "allowedCipherSuites" .= [1 :: Int], | ||
"defaultCipherSuite" .= (1 :: Int), | ||
"defaultProtocol" .= "mls", | ||
"protocolToggleUsers" .= ([] :: [String]), | ||
"supportedProtocols" .= ["mls", "proteus"] | ||
], | ||
"status" .= "enabled", | ||
"ttl" .= "unlimited" | ||
] | ||
patchTeamFeatureConfig OwnDomain tid "mls" mlsConfig >>= assertStatus 200 | ||
|
||
do | ||
-- Check that a random user can't add the service to the whitelist | ||
uid <- randomUser OwnDomain def | ||
serviceId <- service %. "id" & asString | ||
np <- | ||
make | ||
$ object | ||
[ "id" .= serviceId, | ||
"provider" .= providerId, | ||
"whitelisted" .= True | ||
] | ||
bindResponse (postServiceWhitelist uid tid np) $ \resp -> do | ||
resp.status `shouldMatchInt` 409 | ||
(resp.jsonBody %. "label") `shouldMatch` Just "mls-services-not-allowed" | ||
|
||
do | ||
-- Check that an admin can't add the service to the whitelist | ||
serviceId <- service %. "id" & asString | ||
np <- | ||
make | ||
$ object | ||
[ "id" .= serviceId, | ||
"provider" .= providerId, | ||
"whitelisted" .= True | ||
] | ||
postServiceWhitelist admin tid np >>= \resp -> do | ||
resp.status `shouldMatchInt` 409 | ||
(resp.jsonBody %. "label") `shouldMatch` Just "mls-services-not-allowed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.