mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-02 21:18:05 +02:00
Remove plugin center login without url (#1978)
This removes the "login" button for the plugin center, when the authentication url is not set.
This commit is contained in:
@@ -147,6 +147,16 @@ class PluginCenterAuthResourceTest {
|
||||
assertThat(root.get("_links").get("login").get("href").asText()).isEqualTo("/v2/plugins/auth/login");
|
||||
}
|
||||
|
||||
@Test
|
||||
@SubjectAware(value = "marvin", permissions = "plugin:write")
|
||||
void shouldNotReturnLoginLinkIfPermittedButNotConfigured() throws URISyntaxException, IOException {
|
||||
scmConfiguration.setPluginAuthUrl(null);
|
||||
|
||||
JsonNode root = getJson("/v2/plugins/auth");
|
||||
|
||||
assertThat(root.get("_links").get("login")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@SubjectAware(value = "marvin", permissions = "plugin:write")
|
||||
void shouldReturnReconnectAndLogoutLinkForFailedAuthentication() throws URISyntaxException, IOException {
|
||||
|
||||
Reference in New Issue
Block a user