import com.codeborne.selenide.Condition;
import com.sonar.orchestrator.Orchestrator;
import it.Category4Suite;
-import java.io.IOException;
import java.util.UUID;
import org.junit.After;
import org.junit.AfterClass;
assertThat(checkAuthenticationWithAuthenticateWebService("jo", "password")).isTrue();
}
- @Test
- @Ignore("signing up will be dropped: SONAR-7762")
- public void allow_users_to_sign_up() throws IOException {
- setServerProperty(ORCHESTRATOR, "sonar.allowUsersToSignUp", "true");
-
- runSelenese(ORCHESTRATOR, "/user/LocalAuthenticationTest/allow_users_to_sign_up.html");
-
- // This check is failing because signup doesn't refresh the users ES index !
- // Will be fixed by SONAR-7308
- // userRule.verifyUserExists("signuplogin", "SignUpName", null);
- }
-
@Test
public void authentication_through_ui() {
runSelenese(ORCHESTRATOR,
+ 25 // level 1
+ 47 // content of DaoModule
+ 3 // content of EsSearchModule
- + 62 // content of CorePropertyDefinitions
+ + 61 // content of CorePropertyDefinitions
+ 1 // content of CePropertyDefinitions
);
assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
return settings.getBoolean(CoreProperties.CORE_AUTHENTICATOR_CREATE_USERS);
}
- private boolean getAllowUsersToSignUp() {
- return settings.getBoolean(CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY);
- }
-
private boolean getForceAuthentication() {
return settings.getBoolean(CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY);
}
addIfNotEmpty("Accepted external identity providers", getEnabledIdentityProviders(), attributes);
addIfNotEmpty("External identity providers whose users are allowed to sign themselves up", getAllowsToSignUpEnabledIdentityProviders(), attributes);
attributes.put("Automatic User Creation", getAutomaticUserCreation());
- attributes.put("Allow Users to Sign Up", getAllowUsersToSignUp());
attributes.put("Force authentication", getForceAuthentication());
attributes.put("Official Distribution", isOfficialDistribution());
attributes.put("Home Dir", settings.getString(ProcessProperties.PATH_HOME));
settings.setProperty("sonar.lf.enableGravatar", true);
settings.setProperty("sonar.updatecenter.activate", false);
settings.setProperty("sonar.technicalDebt.ratingGrid", "0.05,0.1,0.2,0.5");
- settings.setProperty("sonar.allowUsersToSignUp", true);
when(server.getVersion()).thenReturn("6.2");
when(database.getDialect()).thenReturn(new MySql());
static List<PropertyDefinition> all() {
return ImmutableList.of(
-
- PropertyDefinition.builder(CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY)
- .defaultValue(Boolean.toString(CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE))
- .name("Activate sign up for local account")
- .description("Allow users to sign up online for a local account. For that purpose, a \"Sign Up\" link will be available in the \"Login\" page.")
- .type(PropertyType.BOOLEAN)
- .category(CoreProperties.CATEGORY_SECURITY)
- .build(),
-
PropertyDefinition.builder(CoreProperties.CORE_DEFAULT_GROUP)
.defaultValue(CoreProperties.CORE_DEFAULT_GROUP_DEFAULT_VALUE)
.name("Default user group")
.description("Forcing user authentication stops un-logged users to access SonarQube.")
.type(PropertyType.BOOLEAN)
.category(CoreProperties.CATEGORY_SECURITY)
- .build()
- );
+ .build());
}
}
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(64);
+ assertThat(defs).hasSize(63);
}
@Test