Let EnterpriseService prevent usage of homeserver (#4682)
* Add check on homeserver url. * Update screenshots * Add missing test * Update submodule link. --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
8bbe4a55d2
commit
93eb70bd83
14 changed files with 108 additions and 5 deletions
|
|
@ -17,6 +17,7 @@ class FakeEnterpriseService(
|
|||
override val isEnterpriseBuild: Boolean = false,
|
||||
private val isEnterpriseUserResult: (SessionId) -> Boolean = { lambdaError() },
|
||||
private val defaultHomeserverResult: () -> String? = { A_FAKE_HOMESERVER },
|
||||
private val isAllowedToConnectToHomeserverResult: (String) -> Boolean = { lambdaError() },
|
||||
private val semanticColorsLightResult: () -> SemanticColors = { lambdaError() },
|
||||
private val semanticColorsDarkResult: () -> SemanticColors = { lambdaError() },
|
||||
private val firebasePushGatewayResult: () -> String? = { lambdaError() },
|
||||
|
|
@ -30,6 +31,10 @@ class FakeEnterpriseService(
|
|||
return defaultHomeserverResult()
|
||||
}
|
||||
|
||||
override suspend fun isAllowedToConnectToHomeserver(homeserverUrl: String): Boolean = simulateLongTask {
|
||||
isAllowedToConnectToHomeserverResult(homeserverUrl)
|
||||
}
|
||||
|
||||
override fun semanticColorsLight(): SemanticColors {
|
||||
return semanticColorsLightResult()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue