diff options
author | Pierre Guillot <50145663+pierre-guillot-sonarsource@users.noreply.github.com> | 2022-06-07 09:48:04 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-06-07 20:03:10 +0000 |
commit | 4597d09ca1a81c86a56f416d2a9b4cb27e6ca4c2 (patch) | |
tree | 454cac73481faf13d3773caab4c5026fbb4541f4 | |
parent | 624f20e1bbcda0bd58e544144b023ad345d582f6 (diff) | |
download | sonarqube-4597d09ca1a81c86a56f416d2a9b4cb27e6ca4c2.tar.gz sonarqube-4597d09ca1a81c86a56f416d2a9b4cb27e6ca4c2.zip |
SONAR-16449 remove SonarCloud references in SonarQube codebase
44 files changed, 135 insertions, 524 deletions
diff --git a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/security/AppToken.java b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/security/AppToken.java index a321a1c0efe..f9059f8247b 100644 --- a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/security/AppToken.java +++ b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/security/AppToken.java @@ -25,13 +25,13 @@ import static java.util.Objects.requireNonNull; /** * JWT (Json Web Token) to authenticate API requests on behalf - * of the SonarCloud App. + * of the Github App. * * Token expires after {@link #EXPIRATION_PERIOD_IN_MINUTES} minutes. * * IMPORTANT * Rate limit is 5'000 API requests per hour for ALL the clients - * of the SonarCloud App (all instances of {@link AppToken} from Compute Engines/web servers + * of the Github App (all instances of {@link AppToken} from Compute Engines/web servers * and from the other SonarSource services using the App). For example three calls with * three different tokens will consume 3 hits. Remaining quota will be 4'997. * When the token is expired, the rate limit is 60 calls per hour for the public IP @@ -42,7 +42,7 @@ import static java.util.Objects.requireNonNull; @Immutable public class AppToken implements AccessToken { - // SONARCLOUD-468 maximum allowed by GitHub is 10 minutes but we use 9 minutes just in case clocks are not synchronized + // maximum allowed by GitHub is 10 minutes but we use 9 minutes just in case clocks are not synchronized static final int EXPIRATION_PERIOD_IN_MINUTES = 9; private final String jwt; diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index ff9eea4f9f0..fd41e64a6c4 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -47,7 +47,6 @@ import org.sonar.ce.CeTaskCommonsModule; import org.sonar.ce.StandaloneCeDistributedInformation; import org.sonar.ce.async.SynchronousAsyncExecution; import org.sonar.ce.cleaning.CeCleaningModule; -import org.sonar.ce.cleaning.NoopCeCleaningSchedulerImpl; import org.sonar.ce.db.ReadOnlyPropertiesDao; import org.sonar.ce.issue.index.NoAsyncIssueIndexing; import org.sonar.ce.logging.CeProcessLogging; @@ -157,7 +156,6 @@ import static org.sonar.core.extension.CoreExtensionsInstaller.noAdditionalSideF import static org.sonar.core.extension.PlatformLevelPredicates.hasPlatformLevel; import static org.sonar.core.extension.PlatformLevelPredicates.hasPlatformLevel4OrNone; import static org.sonar.process.ProcessProperties.Property.CLUSTER_ENABLED; -import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED; public class ComputeEngineContainerImpl implements ComputeEngineContainer { @@ -452,12 +450,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer { ); - if (props.valueAsBoolean(SONARCLOUD_ENABLED.getKey())) { - // no cleaning job on sonarcloud and no distributed information - container.add( - NoopCeCleaningSchedulerImpl.class, - StandaloneCeDistributedInformation.class); - } else if (props.valueAsBoolean(CLUSTER_ENABLED.getKey())) { + if (props.valueAsBoolean(CLUSTER_ENABLED.getKey())) { container.add( new CeCleaningModule(), diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java index 3b165f871b2..bd5dc75b561 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/audit/model/UserNewValue.java @@ -56,9 +56,6 @@ public class UserNewValue extends NewValue { private Boolean local; @Nullable - private Boolean onboarded; - - @Nullable private Boolean root; @Nullable @@ -80,7 +77,6 @@ public class UserNewValue extends NewValue { this.externalLogin = userDto.getExternalLogin(); this.externalIdentityProvider = userDto.getExternalIdentityProvider(); this.local = userDto.isLocal(); - this.onboarded = userDto.isOnboarded(); this.root = userDto.isRoot(); this.lastConnectionDate = userDto.getLastConnectionDate(); } @@ -134,11 +130,6 @@ public class UserNewValue extends NewValue { } @CheckForNull - public Boolean isOnboarded() { - return this.onboarded; - } - - @CheckForNull public Boolean isRoot() { return this.root; } @@ -161,7 +152,6 @@ public class UserNewValue extends NewValue { addField(sb, "\"externalLogin\": ", this.externalLogin, true); addField(sb, "\"externalIdentityProvider\": ", this.externalIdentityProvider, true); addField(sb, "\"local\": ", ObjectUtils.toString(this.local), false); - addField(sb, "\"onboarded\": ", ObjectUtils.toString(this.onboarded), false); addField(sb, "\"root\": ", ObjectUtils.toString(this.root), false); addField(sb, "\"lastConnectionDate\": ", this.lastConnectionDate == null ? "" : DateUtils.formatDateTime(this.lastConnectionDate), true); diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java index d58d4cda753..a6ab38a2d42 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java @@ -53,7 +53,6 @@ public class UserDto implements UserId { private String homepageParameter; private boolean local = true; private boolean root = false; - private boolean onboarded = false; private boolean resetPassword = false; private boolean sonarlintAdSeen = false; @@ -261,15 +260,6 @@ public class UserDto implements UserId { this.root = root; } - public boolean isOnboarded() { - return onboarded; - } - - public UserDto setOnboarded(boolean onboarded) { - this.onboarded = onboarded; - return this; - } - public boolean isResetPassword() { return resetPassword; } diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml index b6d4b139e3c..4f34375559b 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml @@ -18,7 +18,6 @@ u.external_identity_provider as "externalIdentityProvider", u.user_local as "local", u.is_root as "root", - u.onboarded as "onboarded", u.reset_password as "resetPassword", u.homepage_type as "homepageType", u.homepage_parameter as "homepageParameter", @@ -237,7 +236,6 @@ crypted_password, hash_method, is_root, - onboarded, last_sonarlint_connection, sonarlint_ad_seen, reset_password, @@ -260,7 +258,6 @@ #{user.cryptedPassword,jdbcType=VARCHAR}, #{user.hashMethod,jdbcType=VARCHAR}, #{user.root,jdbcType=BOOLEAN}, - #{user.onboarded,jdbcType=BOOLEAN}, #{user.lastSonarlintConnectionDate,jdbcType=BIGINT}, #{user.sonarlintAdSeen,jdbcType=BOOLEAN}, #{user.resetPassword,jdbcType=BOOLEAN}, @@ -282,7 +279,6 @@ external_login = #{user.externalLogin, jdbcType=VARCHAR}, external_identity_provider = #{user.externalIdentityProvider, jdbcType=VARCHAR}, user_local = #{user.local, jdbcType=BOOLEAN}, - onboarded = #{user.onboarded, jdbcType=BOOLEAN}, reset_password = #{user.resetPassword, jdbcType=BOOLEAN}, salt = #{user.salt, jdbcType=VARCHAR}, crypted_password = #{user.cryptedPassword, jdbcType=BIGINT}, diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index ce605b46a5b..4aa81a9d442 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -982,7 +982,6 @@ CREATE TABLE "USERS"( "EXTERNAL_ID" CHARACTER VARYING(255) NOT NULL, "IS_ROOT" BOOLEAN NOT NULL, "USER_LOCAL" BOOLEAN, - "ONBOARDED" BOOLEAN NOT NULL, "HOMEPAGE_TYPE" CHARACTER VARYING(40), "HOMEPAGE_PARAMETER" CHARACTER VARYING(40), "LAST_CONNECTION_DATE" BIGINT, diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/audit/model/UserNewValueTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/audit/model/UserNewValueTest.java index 03eae269928..644c47979d1 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/audit/model/UserNewValueTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/audit/model/UserNewValueTest.java @@ -40,7 +40,6 @@ public class UserNewValueTest { userDto.setExternalLogin("name"); userDto.setExternalIdentityProvider("github"); userDto.setLocal(false); - userDto.setOnboarded(true); userDto.setLastConnectionDate(System.currentTimeMillis()); UserNewValue userNewValue = new UserNewValue(userDto); diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java index f166b7fe7ae..883437e4c8f 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java @@ -343,7 +343,6 @@ public class UserDaoTest { assertThat(user).isNotNull(); assertThat(user.getUuid()).isNotNull(); assertThat(user.isActive()).isTrue(); - assertThat(user.isOnboarded()).isFalse(); assertThat(user.isResetPassword()).isFalse(); assertThat(user.isLocal()).isTrue(); assertThat(user.isRoot()).isFalse(); @@ -366,7 +365,6 @@ public class UserDaoTest { .setEmail("jo@hn.com") .setScmAccounts(",jo.hn,john2,") .setActive(true) - .setOnboarded(true) .setResetPassword(true) .setSalt("1234") .setCryptedPassword("abcd") @@ -389,7 +387,6 @@ public class UserDaoTest { assertThat(user.getName()).isEqualTo("John"); assertThat(user.getEmail()).isEqualTo("jo@hn.com"); assertThat(user.isActive()).isTrue(); - assertThat(user.isOnboarded()).isTrue(); assertThat(user.isResetPassword()).isTrue(); assertThat(user.getScmAccounts()).isEqualTo(",jo.hn,john2,"); assertThat(user.getSalt()).isEqualTo("1234"); @@ -423,7 +420,6 @@ public class UserDaoTest { .setEmail("jo@hn.com") .setActive(true) .setLocal(true) - .setOnboarded(false) .setResetPassword(false)); underTest.update(db.getSession(), newUserDto() @@ -433,7 +429,6 @@ public class UserDaoTest { .setEmail("jodoo@hn.com") .setScmAccounts(",jo.hn,john2,johndoo,") .setActive(false) - .setOnboarded(true) .setResetPassword(true) .setSalt("12345") .setCryptedPassword("abcde") @@ -453,7 +448,6 @@ public class UserDaoTest { assertThat(reloaded.getName()).isEqualTo("John Doo"); assertThat(reloaded.getEmail()).isEqualTo("jodoo@hn.com"); assertThat(reloaded.isActive()).isFalse(); - assertThat(reloaded.isOnboarded()).isTrue(); assertThat(reloaded.isResetPassword()).isTrue(); assertThat(reloaded.getScmAccounts()).isEqualTo(",jo.hn,john2,johndoo,"); assertThat(reloaded.getSalt()).isEqualTo("12345"); diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoWithPersisterTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoWithPersisterTest.java index ea3bfbe80c5..6a4fadf7b84 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoWithPersisterTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoWithPersisterTest.java @@ -83,7 +83,6 @@ public class UserDaoWithPersisterTest { .setEmail("jo@hn.com") .setActive(true) .setLocal(true) - .setOnboarded(false) .setResetPassword(false)); UserDto updatedUser = newUserDto() .setUuid(user.getUuid()) @@ -92,7 +91,6 @@ public class UserDaoWithPersisterTest { .setEmail("jodoo@hn.com") .setScmAccounts(",jo.hn,john2,johndoo,") .setActive(false) - .setOnboarded(true) .setResetPassword(true) .setSalt("12345") .setCryptedPassword("abcde") @@ -111,10 +109,10 @@ public class UserDaoWithPersisterTest { assertThat(newValue) .extracting(UserNewValue::getUserUuid, UserNewValue::getUserLogin, UserNewValue::getName, UserNewValue::getEmail, UserNewValue::isActive, UserNewValue::getScmAccounts, UserNewValue::getExternalId, UserNewValue::getExternalLogin, UserNewValue::getExternalIdentityProvider, - UserNewValue::isLocal, UserNewValue::isOnboarded, UserNewValue::isRoot, UserNewValue::getLastConnectionDate) + UserNewValue::isLocal, UserNewValue::isRoot, UserNewValue::getLastConnectionDate) .containsExactly(updatedUser.getUuid(), updatedUser.getLogin(), updatedUser.getName(), updatedUser.getEmail(), updatedUser.isActive(), updatedUser.getScmAccounts(), updatedUser.getExternalId(), updatedUser.getExternalLogin(), updatedUser.getExternalIdentityProvider(), - updatedUser.isLocal(), updatedUser.isOnboarded(), updatedUser.isRoot(), updatedUser.getLastConnectionDate()); + updatedUser.isLocal(), updatedUser.isRoot(), updatedUser.getLastConnectionDate()); assertThat(newValue.toString()) .contains("name") .contains(DateUtils.formatDateTime(updatedUser.getLastConnectionDate())); @@ -128,7 +126,6 @@ public class UserDaoWithPersisterTest { .setEmail("jo@hn.com") .setActive(true) .setLocal(true) - .setOnboarded(false) .setResetPassword(false)); verify(auditPersister).addUser(eq(db.getSession()), newValueCaptor.capture()); diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java index 042e80f9c4e..c75eec6e83e 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java @@ -36,7 +36,6 @@ public class UserTesting { .setLogin(randomAlphanumeric(30)) .setName(randomAlphanumeric(30)) .setEmail(randomAlphanumeric(30)) - .setOnboarded(nextBoolean()) .setScmAccounts(singletonList(randomAlphanumeric(40))) .setExternalId(randomAlphanumeric(40)) .setExternalLogin(randomAlphanumeric(40)) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DbVersion95.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DbVersion95.java index e2d0ac509b2..9a92d949627 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DbVersion95.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DbVersion95.java @@ -45,6 +45,8 @@ public class DbVersion95 implements DbVersion { .add(6414, "Drop rules_metadata table", DropRuleMetadataTable.class) .add(6415, "Migrate hotspot rule descriptions", MigrateHotspotRuleDescriptions.class) + + .add(6416, "Remove onboarded column from User table", DropOnboardedColumnFromUserTable.class) ; } } diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/cleaning/NoopCeCleaningSchedulerImpl.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTable.java index fb8ca7b3cff..359d617e046 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/cleaning/NoopCeCleaningSchedulerImpl.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTable.java @@ -17,11 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.ce.cleaning; +package org.sonar.server.platform.db.migration.version.v95; -public class NoopCeCleaningSchedulerImpl implements CeCleaningScheduler { - @Override - public void startScheduling() { - // do nothing +import org.sonar.db.Database; +import org.sonar.server.platform.db.migration.step.DropColumnChange; + +public class DropOnboardedColumnFromUserTable extends DropColumnChange { + + protected DropOnboardedColumnFromUserTable(Database db) { + super(db, "users", "onboarded"); } } diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest.java new file mode 100644 index 00000000000..c44d4cdc0b9 --- /dev/null +++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest.java @@ -0,0 +1,54 @@ +/* + * SonarQube + * Copyright (C) 2009-2022 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.platform.db.migration.version.v95; + +import java.sql.SQLException; +import java.sql.Types; +import org.junit.Rule; +import org.junit.Test; +import org.sonar.db.CoreDbTester; +import org.sonar.server.platform.db.migration.step.DdlChange; + +public class DropOnboardedColumnFromUserTableTest { + + private static final String COLUMN_NAME = "onboarded"; + private static final String TABLE_NAME = "users"; + + @Rule + public final CoreDbTester db = CoreDbTester.createForSchema(DropOnboardedColumnFromUserTableTest.class, "schema.sql"); + + private final DdlChange dropRuleDescriptionColumn = new DropOnboardedColumnFromUserTable(db.database()); + + @Test + public void migration_should_drop_onboarded_column() throws SQLException { + db.assertColumnDefinition(TABLE_NAME, COLUMN_NAME, Types.BOOLEAN, null, false); + dropRuleDescriptionColumn.execute(); + db.assertColumnDoesNotExist(TABLE_NAME, COLUMN_NAME); + } + + @Test + public void migration_should_be_reentrant() throws SQLException { + db.assertColumnDefinition(TABLE_NAME, COLUMN_NAME, Types.BOOLEAN, null, false); + dropRuleDescriptionColumn.execute(); + // re-entrant + dropRuleDescriptionColumn.execute(); + db.assertColumnDoesNotExist(TABLE_NAME, COLUMN_NAME); + } +}
\ No newline at end of file diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest/schema.sql new file mode 100644 index 00000000000..e2eca57a0c0 --- /dev/null +++ b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v95/DropOnboardedColumnFromUserTableTest/schema.sql @@ -0,0 +1,30 @@ +CREATE TABLE "USERS"( + "UUID" CHARACTER VARYING(255) NOT NULL, + "LOGIN" CHARACTER VARYING(255) NOT NULL, + "NAME" CHARACTER VARYING(200), + "EMAIL" CHARACTER VARYING(100), + "CRYPTED_PASSWORD" CHARACTER VARYING(100), + "SALT" CHARACTER VARYING(40), + "HASH_METHOD" CHARACTER VARYING(10), + "ACTIVE" BOOLEAN DEFAULT TRUE, + "SCM_ACCOUNTS" CHARACTER VARYING(4000), + "EXTERNAL_LOGIN" CHARACTER VARYING(255) NOT NULL, + "EXTERNAL_IDENTITY_PROVIDER" CHARACTER VARYING(100) NOT NULL, + "EXTERNAL_ID" CHARACTER VARYING(255) NOT NULL, + "IS_ROOT" BOOLEAN NOT NULL, + "USER_LOCAL" BOOLEAN, + "ONBOARDED" BOOLEAN NOT NULL, + "HOMEPAGE_TYPE" CHARACTER VARYING(40), + "HOMEPAGE_PARAMETER" CHARACTER VARYING(40), + "LAST_CONNECTION_DATE" BIGINT, + "CREATED_AT" BIGINT, + "UPDATED_AT" BIGINT, + "RESET_PASSWORD" BOOLEAN NOT NULL, + "LAST_SONARLINT_CONNECTION" BIGINT, + "SONARLINT_AD_SEEN" BOOLEAN DEFAULT FALSE +); +ALTER TABLE "USERS" ADD CONSTRAINT "PK_USERS" PRIMARY KEY("UUID"); +CREATE UNIQUE INDEX "USERS_LOGIN" ON "USERS"("LOGIN" NULLS FIRST); +CREATE INDEX "USERS_UPDATED_AT" ON "USERS"("UPDATED_AT" NULLS FIRST); +CREATE UNIQUE INDEX "UNIQ_EXTERNAL_ID" ON "USERS"("EXTERNAL_IDENTITY_PROVIDER" NULLS FIRST, "EXTERNAL_ID" NULLS FIRST); +CREATE UNIQUE INDEX "UNIQ_EXTERNAL_LOGIN" ON "USERS"("EXTERNAL_IDENTITY_PROVIDER" NULLS FIRST, "EXTERNAL_LOGIN" NULLS FIRST); diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java index 03b636d284c..a23af65a163 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java @@ -174,12 +174,6 @@ public class ProcessProperties { SONAR_UPDATECENTER_ACTIVATE("sonar.updatecenter.activate", "true"), - SONARCLOUD_ENABLED("sonar.sonarcloud.enabled", DEFAULT_FALSE), - SONARCLOUD_HOMEPAGE_URL("sonar.homepage.url", ""), - SONAR_PRISMIC_ACCESS_TOKEN("sonar.prismic.accessToken", ""), - SONAR_ANALYTICS_GTM_TRACKING_ID("sonar.analytics.gtm.trackingId", ""), - ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS("sonar.onboardingTutorial.showToNewUsers", "true"), - /** * Used by Orchestrator to ask for shutdown of monitor process */ diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessPropertiesTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessPropertiesTest.java index 0d9269a9aa1..b75e4e27e8c 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessPropertiesTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessPropertiesTest.java @@ -48,7 +48,6 @@ public class ProcessPropertiesTest { assertThat(props.value("sonar.search.javaOpts")).contains("-Xmx"); assertThat(props.valueAsInt("sonar.jdbc.maxActive")).isEqualTo(60); - assertThat(props.valueAsBoolean("sonar.sonarcloud.enabled")).isFalse(); assertThat(props.valueAsBoolean("sonar.updatecenter.activate")).isTrue(); } diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java index d8d9fca10f3..7df1a44f9b3 100644 --- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java +++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java @@ -55,7 +55,6 @@ import static java.util.stream.Stream.concat; import static org.sonar.api.CoreProperties.DEFAULT_ISSUE_ASSIGNEE; import static org.sonar.core.util.Slug.slugify; import static org.sonar.core.util.stream.MoreCollectors.toList; -import static org.sonar.process.ProcessProperties.Property.ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS; import static org.sonar.server.exceptions.BadRequestException.checkRequest; @ServerSide @@ -118,7 +117,6 @@ public class UserUpdater { if (password != null) { updateUser.setPassword(password); } - setOnboarded(reactivatedUser); updateDto(dbSession, updateUser, reactivatedUser); updateUser(dbSession, reactivatedUser); addUserToDefaultGroup(dbSession, reactivatedUser); @@ -177,7 +175,6 @@ public class UserUpdater { } setExternalIdentity(dbSession, userDto, newUser.externalIdentity()); - setOnboarded(userDto); checkRequest(messages.isEmpty(), messages); return userDto; @@ -306,11 +303,6 @@ public class UserUpdater { "A user with provider id '%s' and identity provider '%s' already exists", dto.getExternalId(), dto.getExternalIdentityProvider()); } - private void setOnboarded(UserDto userDto) { - boolean showOnboarding = config.getBoolean(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey()).orElse(false); - userDto.setOnboarded(!showOnboarding); - } - private static boolean checkNotEmptyParam(@Nullable String value, String param, List<String> messages) { if (isNullOrEmpty(value)) { messages.add(format(Validation.CANT_BE_EMPTY_MESSAGE, param)); diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java index e535e6416be..accef48c744 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java @@ -51,7 +51,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.process.ProcessProperties.Property.ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS; import static org.sonar.server.authentication.event.AuthenticationEvent.Method.BASIC; public class UserRegistrarImplTest { @@ -168,24 +167,6 @@ public class UserRegistrarImplTest { } @Test - public void authenticate_new_user_sets_onboarded_flag_to_false_when_onboarding_setting_is_set_to_true() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), true); - - UserDto user = underTest.register(newUserRegistration()); - - assertThat(db.users().selectUserByLogin(user.getLogin()).get().isOnboarded()).isFalse(); - } - - @Test - public void authenticate_new_user_sets_onboarded_flag_to_true_when_onboarding_setting_is_set_to_false() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), false); - - UserDto user = underTest.register(newUserRegistration()); - - assertThat(db.users().selectUserByLogin(user.getLogin()).get().isOnboarded()).isTrue(); - } - - @Test public void authenticate_new_user_sets_external_id_to_provider_login_when_id_is_null() { UserIdentity newUser = UserIdentity.builder() .setProviderId(null) diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java index 55dff0fef63..5d799c5cc0b 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java @@ -53,7 +53,6 @@ import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.sonar.db.user.UserTesting.newLocalUser; -import static org.sonar.process.ProcessProperties.Property.ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS; import static org.sonar.server.user.ExternalIdentity.SQ_AUTHORITY; public class UserUpdaterCreateTest { @@ -266,34 +265,6 @@ public class UserUpdaterCreateTest { } @Test - public void create_not_onboarded_user_if_onboarding_setting_is_set_to_false() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), false); - createDefaultGroup(); - - underTest.createAndCommit(db.getSession(), NewUser.builder() - .setLogin("user") - .setName("User") - .build(), u -> { - }); - - assertThat(dbClient.userDao().selectByLogin(session, "user").isOnboarded()).isTrue(); - } - - @Test - public void create_onboarded_user_if_onboarding_setting_is_set_to_true() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), true); - createDefaultGroup(); - - underTest.createAndCommit(db.getSession(), NewUser.builder() - .setLogin("user") - .setName("User") - .build(), u -> { - }); - - assertThat(dbClient.userDao().selectByLogin(session, "user").isOnboarded()).isFalse(); - } - - @Test public void create_user_and_index_other_user() { createDefaultGroup(); UserDto otherUser = db.users().insertUser(); diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java index 9698cd53b29..b5448e9caf9 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java @@ -47,7 +47,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.sonar.process.ProcessProperties.Property.ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS; public class UserUpdaterReactivateTest { @@ -238,36 +237,6 @@ public class UserUpdaterReactivateTest { } @Test - public void reactivate_not_onboarded_user_if_onboarding_setting_is_set_to_false() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), false); - UserDto user = db.users().insertDisabledUser(u -> u.setOnboarded(false)); - createDefaultGroup(); - - underTest.reactivateAndCommit(db.getSession(), user, NewUser.builder() - .setLogin(user.getLogin()) - .setName(user.getName()) - .build(), u -> { - }); - - assertThat(dbClient.userDao().selectByLogin(session, user.getLogin()).isOnboarded()).isTrue(); - } - - @Test - public void reactivate_onboarded_user_if_onboarding_setting_is_set_to_true() { - settings.setProperty(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS.getKey(), true); - UserDto user = db.users().insertDisabledUser(u -> u.setOnboarded(true)); - createDefaultGroup(); - - underTest.reactivateAndCommit(db.getSession(), user, NewUser.builder() - .setLogin(user.getLogin()) - .setName(user.getName()) - .build(), u -> { - }); - - assertThat(dbClient.userDao().selectByLogin(session, user.getLogin()).isOnboarded()).isFalse(); - } - - @Test public void fail_to_reactivate_user_when_login_already_exists() { createDefaultGroup(); UserDto user = db.users().insertUser(u -> u.setActive(false)); diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/badge/ws/SvgGenerator.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/badge/ws/SvgGenerator.java index b29b11dfbff..c0715f87fa1 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/badge/ws/SvgGenerator.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/badge/ws/SvgGenerator.java @@ -24,7 +24,6 @@ import java.io.IOException; import java.util.Map; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.text.StrSubstitutor; -import org.sonar.api.config.Configuration; import org.sonar.api.measures.Metric; import org.sonar.api.server.ServerSide; @@ -34,7 +33,6 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.sonar.api.measures.Metric.Level.ERROR; import static org.sonar.api.measures.Metric.Level.OK; import static org.sonar.api.measures.Metric.Level.WARN; -import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED; @ServerSide public class SvgGenerator { @@ -109,8 +107,7 @@ public class SvgGenerator { .put('\'', 3) .build(); - private static final String TEMPLATES_SONARCLOUD = "templates/sonarcloud"; - private static final String TEMPLATES_SONARQUBE = "templates/sonarqube"; + private static final String TEMPLATES_PATH = "templates/sonarqube"; private static final int MARGIN = 6; private static final int ICON_WIDTH = 20; @@ -130,15 +127,13 @@ public class SvgGenerator { private final String badgeTemplate; private final Map<Metric.Level, String> qualityGateTemplates; - public SvgGenerator(Configuration config) { - boolean isOnSonarCloud = config.getBoolean(SONARCLOUD_ENABLED.getKey()).orElse(false); - String templatePath = isOnSonarCloud ? TEMPLATES_SONARCLOUD : TEMPLATES_SONARQUBE; + public SvgGenerator() { this.errorTemplate = readTemplate("templates/error.svg"); - this.badgeTemplate = readTemplate(templatePath + "/badge.svg"); - this.qualityGateTemplates = ImmutableMap.of( - OK, readTemplate(templatePath + "/quality_gate_passed.svg"), - WARN, readTemplate(templatePath + "/quality_gate_warn.svg"), - ERROR, readTemplate(templatePath + "/quality_gate_failed.svg")); + this.badgeTemplate = readTemplate(TEMPLATES_PATH + "/badge.svg"); + this.qualityGateTemplates = Map.of( + OK, readTemplate(TEMPLATES_PATH + "/quality_gate_passed.svg"), + WARN, readTemplate(TEMPLATES_PATH + "/quality_gate_warn.svg"), + ERROR, readTemplate(TEMPLATES_PATH + "/quality_gate_failed.svg")); } public String generateBadge(String label, String value, Color backgroundValueColor) { diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ui/ws/GlobalAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ui/ws/GlobalAction.java index a5b145d8d41..86bd04823de 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ui/ws/GlobalAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ui/ws/GlobalAction.java @@ -59,15 +59,11 @@ import static org.sonar.core.config.WebConstants.SONAR_LF_LOGO_WIDTH_PX; import static org.sonar.core.platform.EditionProvider.Edition; import static org.sonar.core.platform.EditionProvider.Edition.DATACENTER; import static org.sonar.core.platform.EditionProvider.Edition.ENTERPRISE; -import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED; -import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_HOMEPAGE_URL; -import static org.sonar.process.ProcessProperties.Property.SONAR_ANALYTICS_GTM_TRACKING_ID; -import static org.sonar.process.ProcessProperties.Property.SONAR_PRISMIC_ACCESS_TOKEN; import static org.sonar.process.ProcessProperties.Property.SONAR_UPDATECENTER_ACTIVATE; public class GlobalAction implements NavigationWsAction, Startable { - private static final Set<String> DYNAMIC_SETTING_KEYS = ImmutableSet.of( + private static final Set<String> DYNAMIC_SETTING_KEYS = Set.of( SONAR_LF_LOGO_URL, SONAR_LF_LOGO_WIDTH_PX, SONAR_LF_ENABLE_GRAVATAR, @@ -116,12 +112,6 @@ public class GlobalAction implements NavigationWsAction, Startable { @Override public void start() { this.systemSettingValuesByKey.put(SONAR_UPDATECENTER_ACTIVATE.getKey(), config.get(SONAR_UPDATECENTER_ACTIVATE.getKey()).orElse(null)); - boolean isOnSonarCloud = config.getBoolean(SONARCLOUD_ENABLED.getKey()).orElse(false); - if (isOnSonarCloud) { - this.systemSettingValuesByKey.put(SONAR_PRISMIC_ACCESS_TOKEN.getKey(), config.get(SONAR_PRISMIC_ACCESS_TOKEN.getKey()).orElse(null)); - this.systemSettingValuesByKey.put(SONAR_ANALYTICS_GTM_TRACKING_ID.getKey(), config.get(SONAR_ANALYTICS_GTM_TRACKING_ID.getKey()).orElse(null)); - this.systemSettingValuesByKey.put(SONARCLOUD_HOMEPAGE_URL.getKey(), config.get(SONARCLOUD_HOMEPAGE_URL.getKey()).orElse(null)); - } } @Override diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/CurrentAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/CurrentAction.java index b9f7cfa2f58..fa3fba7c47d 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/CurrentAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/CurrentAction.java @@ -86,7 +86,8 @@ public class CurrentAction implements UsersWsAction { .setChangelog( new Change("6.5", "showOnboardingTutorial is now returned in the response"), new Change("7.1", "'parameter' is replaced by 'component' and 'organization' in the response"), - new Change("9.2", "boolean 'usingSonarLintConnectedMode' and 'sonarLintAdSeen' fields are now returned in the response")); + new Change("9.2", "boolean 'usingSonarLintConnectedMode' and 'sonarLintAdSeen' fields are now returned in the response"), + new Change("9.5", "showOnboardingTutorial is not returned anymore in the response")); } @Override @@ -118,7 +119,6 @@ public class CurrentAction implements UsersWsAction { .addAllScmAccounts(user.getScmAccountsAsList()) .setPermissions(Permissions.newBuilder().addAllGlobal(getGlobalPermissions()).build()) .setHomepage(buildHomepage(dbSession, user)) - .setShowOnboardingTutorial(!user.isOnboarded()) .setUsingSonarLintConnectedMode(user.getLastSonarlintConnectionDate() != null) .setSonarLintAdSeen(user.isSonarlintAdSeen()); ofNullable(emptyToNull(user.getEmail())).ifPresent(builder::setEmail); diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SkipOnboardingTutorialAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SkipOnboardingTutorialAction.java deleted file mode 100644 index ee8dc004213..00000000000 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SkipOnboardingTutorialAction.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2022 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.user.ws; - -import org.sonar.api.server.ws.Request; -import org.sonar.api.server.ws.Response; -import org.sonar.api.server.ws.WebService; -import org.sonar.db.DbClient; -import org.sonar.db.DbSession; -import org.sonar.db.user.UserDto; -import org.sonar.server.user.UserSession; - -import static com.google.common.base.Preconditions.checkState; -import static org.sonarqube.ws.client.user.UsersWsParameters.ACTION_SKIP_ONBOARDING_TUTORIAL; - -public class SkipOnboardingTutorialAction implements UsersWsAction { - - private final UserSession userSession; - private final DbClient dbClient; - - public SkipOnboardingTutorialAction(UserSession userSession, DbClient dbClient) { - this.userSession = userSession; - this.dbClient = dbClient; - } - - @Override - public void define(WebService.NewController context) { - context.createAction(ACTION_SKIP_ONBOARDING_TUTORIAL) - .setPost(true) - .setInternal(true) - .setDescription("Stores that the user has skipped the onboarding tutorial and does not want to see it after future logins.<br/>" + - "Requires authentication.") - .setSince("6.5") - .setHandler(this); - } - - @Override - public void handle(Request request, Response response) throws Exception { - userSession.checkLoggedIn(); - try (DbSession dbSession = dbClient.openSession(false)) { - String userLogin = userSession.getLogin(); - UserDto userDto = dbClient.userDao().selectActiveUserByLogin(dbSession, userLogin); - checkState(userDto != null, "User login '%s' cannot be found", userLogin); - if (!userDto.isOnboarded()) { - userDto.setOnboarded(true); - // no need to update Elasticsearch, the field onBoarded - // is not indexed - dbClient.userDao().update(dbSession, userDto); - dbSession.commit(); - } - } - response.noContent(); - } -} diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg deleted file mode 100644 index 68877b16b1a..00000000000 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg +++ /dev/null @@ -1,23 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}"> - <!-- SONARCLOUD MEASURE --> - <linearGradient id="b" x2="0" y2="100%"> - <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> - <stop offset="1" stop-opacity=".1"/> - </linearGradient> - <clipPath id="a"> - <rect width="${totalWidth}" height="20" rx="3" fill="#fff"/> - </clipPath> - <g clip-path="url(#a)"> - <rect fill="#555" height="20" width="${leftWidth}"/> - <rect fill="${color}" height="20" width="${rightWidth}" x="${leftWidth}"/> - <rect fill="url(#b)" height="20" width="${totalWidth}"/> - </g> - <g fill="#fff" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11" text-anchor="left"> - <text x="${iconWidthPlusMargin}" y="15" textLength="${labelWidth}" fill="#010101" fill-opacity=".3">${label}</text> - <text x="${iconWidthPlusMargin}" y="14" textLength="${labelWidth}">${label}</text> - <text x="${leftWidthPlusMargin}" y="15" textLength="${valueWidth}" fill="#010101" fill-opacity=".3">${value}</text> - <text x="${leftWidthPlusMargin}" y="14" textLength="${valueWidth}">${value}</text> - </g> - <path fill="#010101" fill-opacity=".3" d="M19.58682 9.81722A3.78893 3.78893 0 0 0 17.78048 8.603v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/> - <path fill="#f3702a" d="M19.58682 9.09722A3.78893 3.78893 0 0 0 17.78048 7.883v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/> -</svg>
\ No newline at end of file diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg deleted file mode 100644 index 629d3b34baf..00000000000 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg +++ /dev/null @@ -1,14 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px"> - <!-- SONARCLOUD QUALITY GATE FAIL --> - <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/> - <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/> - <path fill="#434447" d="M94.9 54.3c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.2-5.9-4.7c-.9.2-1.9.3-2.9.3-2.2 0-4.1-.5-5.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0 3.8-.6 5-1.1l.7 3.2zM170.9 189.4h4.1v32.7h-4.1v-32.7zM200.1 210.8c0 8.3-5.7 11.9-11.1 11.9-6 0-10.7-4.4-10.7-11.5 0-7.5 4.9-11.9 11.1-11.9 6.4 0 10.7 4.7 10.7 11.5zm-17.7.2c0 4.9 2.8 8.6 6.8 8.6 3.9 0 6.8-3.6 6.8-8.7 0-3.8-1.9-8.6-6.7-8.6-4.8.1-6.9 4.5-6.9 8.7zM222.1 216c0 2.3 0 4.3.2 6.1h-3.6l-.2-3.6h-.1c-1.1 1.8-3.4 4.2-7.4 4.2-3.5 0-7.7-1.9-7.7-9.8v-13.1h4.1v12.4c0 4.2 1.3 7.1 5 7.1 2.7 0 4.6-1.9 5.3-3.7.2-.6.4-1.3.4-2.1v-13.7h4.1V216h-.1zM246.2 189.4v27c0 2 0 4.2.2 5.8h-3.6l-.2-3.9h-.1c-1.2 2.5-4 4.4-7.6 4.4-5.4 0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/> - </g> -</svg>
\ No newline at end of file diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg deleted file mode 100644 index f8267221aa6..00000000000 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg +++ /dev/null @@ -1,14 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px"> - <!-- SONARCLOUD QUALITY GATE PASS --> - <path fill="#fff" d="M328.4 259.5H21.5C10.9 259.5 2 250.8 2 240V21.9C2 11.3 10.7 2.4 21.5 2.4h307.1c10.6 0 19.5 8.7 19.5 19.5V240c-.2 10.8-8.8 19.5-19.7 19.5z"/> - <path fill="#cfd3d7" d="M328.4 260.4H21.5c-11.2 0-20.4-9.2-20.4-20.4V21.9c0-11.2 9-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4V240c-.2 11.2-9.2 20.4-20.6 20.4zM21.5 3.3c-10.3 0-18.6 8.3-18.6 18.6V240c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V21.9c0-10.3-8.3-18.6-18.6-18.6H21.5z"/> - <path fill="#434447" d="M94.9 54.1c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.3-5.9-4.7c-.9.2-1.9.3-2.9.3-2.2 0-4.1-.5-5.8-1.6-1.7-1.1-3-2.6-3.9-4.6-.9-2-1.4-4.3-1.4-6.9v-2c0-2.7.5-5 1.4-7.1.9-2.1 2.2-3.6 3.9-4.7s3.6-1.6 5.8-1.6c2.2 0 4.2.5 5.9 1.6 1.7 1.1 3 2.6 3.9 4.7.9 2 1.4 4.4 1.4 7.1v1.7zm-3.6-1.8c0-3.3-.7-5.8-2-7.6-1.3-1.8-3.2-2.7-5.6-2.7-2.3 0-4.1.9-5.5 2.6-1.3 1.8-2 4.2-2.1 7.4v2c0 3.2.7 5.7 2 7.5 1.3 1.8 3.2 2.8 5.6 2.8s4.2-.9 5.5-2.6c1.3-1.7 2-4.2 2-7.4v-2zM112.8 65.1c-1.4 1.6-3.4 2.4-6.1 2.4-2.2 0-3.9-.6-5-1.9s-1.7-3.2-1.7-5.7V46.5h3.5v13.4c0 3.1 1.3 4.7 3.8 4.7 2.7 0 4.5-1 5.4-3v-15h3.5v20.7h-3.4v-2.2zM134.4 67.1c-.2-.4-.4-1.1-.5-2.2-1.6 1.7-3.6 2.6-5.9 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0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/> - </g> -</svg>
\ No newline at end of file diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg deleted file mode 100644 index 386c518bc23..00000000000 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg +++ /dev/null @@ -1,14 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px"> - <!-- SONARCLOUD QUALITY GATE WARN --> - <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/> - <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/> - <path fill="#434447" d="M94.9 54.3c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.2-5.9-4.7c-.9.2-1.9.3-2.9.3-2.2 0-4.1-.5-5.8-1.6-1.7-1.1-3-2.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.5-.1 1-.1 1.6v11.4h-7V207zM167.9 221.3c-1.1.6-3.4 1.3-6.4 1.3-6.7 0-11.1-4.6-11.1-11.4 0-6.9 4.7-11.9 12-11.9 2.4 0 4.5.6 5.6 1.2l-.9 3.1c-1-.6-2.5-1.1-4.7-1.1-5.1 0-7.9 3.8-7.9 8.4 0 5.2 3.3 8.3 7.7 8.3 2.3 0 3.8-.6 5-1.1l.7 3.2zM170.9 189.4h4.1v32.7h-4.1v-32.7zM200.1 210.8c0 8.3-5.7 11.9-11.1 11.9-6 0-10.7-4.4-10.7-11.5 0-7.5 4.9-11.9 11.1-11.9 6.4 0 10.7 4.7 10.7 11.5zm-17.7.2c0 4.9 2.8 8.6 6.8 8.6 3.9 0 6.8-3.6 6.8-8.7 0-3.8-1.9-8.6-6.7-8.6-4.8.1-6.9 4.5-6.9 8.7zM222.1 216c0 2.3 0 4.3.2 6.1h-3.6l-.2-3.6h-.1c-1.1 1.8-3.4 4.2-7.4 4.2-3.5 0-7.7-1.9-7.7-9.8v-13.1h4.1v12.4c0 4.2 1.3 7.1 5 7.1 2.7 0 4.6-1.9 5.3-3.7.2-.6.4-1.3.4-2.1v-13.7h4.1V216h-.1zM246.2 189.4v27c0 2 0 4.2.2 5.8h-3.6l-.2-3.9h-.1c-1.2 2.5-4 4.4-7.6 4.4-5.4 0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/> - </g> -</svg>
\ No newline at end of file diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/user/ws/current-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/user/ws/current-example.json index e6b910560d9..e1644c37888 100644 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/user/ws/current-example.json +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/user/ws/current-example.json @@ -7,7 +7,6 @@ "local": true, "externalIdentity": "obiwan.kenobi", "externalProvider": "sonarqube", - "showOnboardingTutorial": false, "scmAccounts": ["obiwan:github", "obiwan:bitbucket"], "groups": ["Jedi", "Rebel"], "usingSonarLintConnectedMode": false, diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java index 8af23c34a2d..f5d070570d8 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java @@ -82,14 +82,14 @@ public class MeasureActionTest { @Rule public DbTester db = DbTester.create(); - private final MapSettings mapSettings = new MapSettings().setProperty("sonar.sonarcloud.enabled", false); + private final MapSettings mapSettings = new MapSettings(); private final Configuration config = mapSettings.asConfig(); private final WsActionTester ws = new WsActionTester( new MeasureAction( db.getDbClient(), new ProjectBadgesSupport(new ComponentFinder(db.getDbClient(), null), db.getDbClient(), config), - new SvgGenerator(mapSettings.asConfig()))); + new SvgGenerator())); @Before public void before(){ diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java index bd50bf23e0e..5a672956ecd 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java @@ -68,13 +68,13 @@ public class QualityGateActionTest { @Rule public DbTester db = DbTester.create(); - private final MapSettings mapSettings = new MapSettings().setProperty("sonar.sonarcloud.enabled", false).setProperty(CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY, false); + private final MapSettings mapSettings = new MapSettings().setProperty(CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY, false); private final Configuration config = mapSettings.asConfig(); private final WsActionTester ws = new WsActionTester( new QualityGateAction(db.getDbClient(), new ProjectBadgesSupport(new ComponentFinder(db.getDbClient(), null), db.getDbClient(), config), - new SvgGenerator(mapSettings.asConfig()))); + new SvgGenerator())); @Before diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java index ad93adfd97a..af4ecb5f6fa 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java @@ -42,13 +42,10 @@ public class SvgGeneratorTest { @Rule public DbTester db = DbTester.create(); - private MapSettings mapSettings = new MapSettings(); - private SvgGenerator underTest; @Test public void generate_badge() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); initSvgGenerator(); String result = underTest.generateBadge("label", "10", DEFAULT); @@ -58,7 +55,6 @@ public class SvgGeneratorTest { @Test public void generate_quality_gate() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); initSvgGenerator(); String result = underTest.generateQualityGate(ERROR); @@ -68,7 +64,6 @@ public class SvgGeneratorTest { @Test public void generate_deprecated_warning_quality_gate() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); initSvgGenerator(); String result = underTest.generateQualityGate(WARN); @@ -78,7 +73,6 @@ public class SvgGeneratorTest { @Test public void generate_error() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); initSvgGenerator(); String result = underTest.generateError("Error"); @@ -88,7 +82,6 @@ public class SvgGeneratorTest { @Test public void fail_when_unknown_character() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); initSvgGenerator(); assertThatThrownBy(() -> underTest.generateError("Méssage with accent")) @@ -96,7 +89,7 @@ public class SvgGeneratorTest { } private void initSvgGenerator() { - underTest = new SvgGenerator(mapSettings.asConfig()); + underTest = new SvgGenerator(); } private void checkBadge(String svg, String expectedLabel, String expectedValue, SvgGenerator.Color expectedColorValue) { diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelServiceModuleTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelServiceModuleTest.java index d3ae5836616..21c00a6a403 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelServiceModuleTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelServiceModuleTest.java @@ -32,7 +32,7 @@ public class ChangeLogLevelServiceModuleTest { private final ChangeLogLevelServiceModule underTest = new ChangeLogLevelServiceModule(webServer); @Test - public void provide_returns_ChangeLogLevelClusterService_if_cluster_not_on_SonarCloud() { + public void provide_returns_ChangeLogLevelClusterService() { when(webServer.isStandalone()).thenReturn(false); ListContainer container = new ListContainer(); diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java index cd3263e4f5b..bb0ecfb6b71 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java @@ -132,23 +132,6 @@ public class GlobalActionTest { } @Test - public void return_sonarcloud_settings() { - settings.setProperty("sonar.sonarcloud.enabled", true); - settings.setProperty("sonar.prismic.accessToken", "secret"); - settings.setProperty("sonar.analytics.gtm.trackingId", "gtm_id"); - settings.setProperty("sonar.homepage.url", "https://s3/homepage.json"); - init(); - - assertJson(call()).isSimilarTo("{" + - " \"settings\": {" + - " \"sonar.prismic.accessToken\": \"secret\"," + - " \"sonar.analytics.gtm.trackingId\": \"gtm_id\"," + - " \"sonar.homepage.url\": \"https://s3/homepage.json\"" + - " }" + - "}"); - } - - @Test public void return_developer_info_disabled_setting() { init(); settings.setProperty("sonar.developerAggregatedInfo.disabled", true); diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java index 600141ca6ae..e87d715a881 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java @@ -71,8 +71,7 @@ public class CurrentActionTest { .setLocal(true) .setExternalLogin("obiwan") .setExternalIdentityProvider("sonarqube") - .setScmAccounts(newArrayList("obiwan:github", "obiwan:bitbucket")) - .setOnboarded(false)); + .setScmAccounts(newArrayList("obiwan:github", "obiwan:bitbucket"))); userSession.logIn(user); CurrentWsResponse response = call(); @@ -80,9 +79,9 @@ public class CurrentActionTest { assertThat(response) .extracting(CurrentWsResponse::getIsLoggedIn, CurrentWsResponse::getLogin, CurrentWsResponse::getName, CurrentWsResponse::getEmail, CurrentWsResponse::getAvatar, CurrentWsResponse::getLocal, - CurrentWsResponse::getExternalIdentity, CurrentWsResponse::getExternalProvider, CurrentWsResponse::getScmAccountsList, CurrentWsResponse::getShowOnboardingTutorial) + CurrentWsResponse::getExternalIdentity, CurrentWsResponse::getExternalProvider, CurrentWsResponse::getScmAccountsList) .containsExactly(true, "obiwan.kenobi", "Obiwan Kenobi", "obiwan.kenobi@starwars.com", "f5aa64437a1821ffe8b563099d506aef", true, "obiwan", "sonarqube", - newArrayList("obiwan:github", "obiwan:bitbucket"), true); + newArrayList("obiwan:github", "obiwan:bitbucket")); } @Test @@ -185,7 +184,6 @@ public class CurrentActionTest { .setExternalLogin("obiwan.kenobi") .setExternalIdentityProvider("sonarqube") .setScmAccounts(newArrayList("obiwan:github", "obiwan:bitbucket")) - .setOnboarded(true) .setHomepageType("PROJECT") .setHomepageParameter("UUID-of-the-death-star")); userSession @@ -231,7 +229,7 @@ public class CurrentActionTest { assertThat(definition.isInternal()).isTrue(); assertThat(definition.responseExampleAsString()).isNotEmpty(); assertThat(definition.params()).isEmpty(); - assertThat(definition.changelog()).hasSize(3); + assertThat(definition.changelog()).hasSize(4); } private CurrentWsResponse call() { diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SkipOnboardingTutorialActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SkipOnboardingTutorialActionTest.java deleted file mode 100644 index da9773eaa86..00000000000 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SkipOnboardingTutorialActionTest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2022 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.user.ws; - -import org.junit.Rule; -import org.junit.Test; -import org.sonar.api.server.ws.WebService; -import org.sonar.db.DbTester; -import org.sonar.db.user.UserDto; -import org.sonar.server.exceptions.UnauthorizedException; -import org.sonar.server.tester.UserSessionRule; -import org.sonar.server.ws.TestResponse; -import org.sonar.server.ws.WsActionTester; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -public class SkipOnboardingTutorialActionTest { - - @Rule - public UserSessionRule userSession = UserSessionRule.standalone(); - - @Rule - public DbTester db = DbTester.create(); - - - private WsActionTester ws = new WsActionTester(new SkipOnboardingTutorialAction(userSession, db.getDbClient())); - - @Test - public void mark_user_as_onboarded() { - UserDto user = db.users().insertUser(u -> u - .setOnboarded(false)); - userSession.logIn(user); - - call(); - - UserDto userDto = selectUser(user.getLogin()); - assertThat(userDto.isOnboarded()).isTrue(); - } - - @Test - public void does_nothing_if_user_already_onboarded() { - UserDto user = db.users().insertUser(u -> u - .setOnboarded(true)); - userSession.logIn(user); - - call(); - - UserDto userDto = selectUser(user.getLogin()); - assertThat(userDto.isOnboarded()).isTrue(); - assertThat(userDto.getUpdatedAt()).isEqualTo(user.getUpdatedAt()); - } - - @Test - public void fail_for_anonymous() { - userSession.anonymous(); - - assertThatThrownBy(() -> call()) - .isInstanceOf(UnauthorizedException.class) - .hasMessage("Authentication is required"); - } - - @Test - public void fail_with_ISE_when_user_login_in_db_does_not_exist() { - db.users().insertUser(usert -> usert.setLogin("another")); - userSession.logIn("obiwan.kenobi"); - - assertThatThrownBy(() -> call()) - .isInstanceOf(IllegalStateException.class) - .hasMessage("User login 'obiwan.kenobi' cannot be found"); - } - - @Test - public void response_has_no_content() { - UserDto user = db.users().insertUser(u -> u.setOnboarded(false)); - userSession.logIn(user); - - TestResponse response = call(); - - assertThat(response.getStatus()).isEqualTo(204); - assertThat(response.getInput()).isEmpty(); - } - - @Test - public void test_definition() { - WebService.Action def = ws.getDef(); - assertThat(def.isPost()).isTrue(); - assertThat(def.isInternal()).isTrue(); - assertThat(def.since()).isEqualTo("6.5"); - assertThat(def.params()).isEmpty(); - assertThat(def.changelog()).isEmpty(); - } - - private TestResponse call() { - return ws.newRequest().setMethod("POST").execute(); - } - - private UserDto selectUser(String userLogin) { - UserDto userDto = db.getDbClient().userDao().selectByLogin(db.getSession(), userLogin); - assertThat(userDto).isNotNull(); - return userDto; - } - -} diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesCache.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesCache.java index 2c2610d250c..0be09569381 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesCache.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesCache.java @@ -19,7 +19,6 @@ */ package org.sonar.server.platform.web; -import com.google.common.collect.ImmutableSet; import java.io.InputStream; import java.util.HashMap; import java.util.Map; @@ -27,7 +26,6 @@ import java.util.Objects; import java.util.Set; import javax.servlet.ServletContext; import org.apache.commons.io.IOUtils; -import org.sonar.api.config.Configuration; import org.sonar.server.platform.OfficialDistribution; import org.sonar.server.platform.Platform; import org.sonar.server.platform.Platform.Status; @@ -35,7 +33,6 @@ import org.sonar.server.platform.Platform.Status; import static com.google.common.base.Preconditions.checkState; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; -import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED; import static org.sonar.server.platform.Platform.Status.UP; public class WebPagesCache { @@ -45,24 +42,21 @@ public class WebPagesCache { private static final String INSTANCE_PLACEHOLDER = "%INSTANCE%"; private static final String OFFICIAL_PLACEHOLDER = "%OFFICIAL%"; - private static final String SONARCLOUD_INSTANCE_VALUE = "SonarCloud"; private static final String SONARQUBE_INSTANCE_VALUE = "SonarQube"; private static final String INDEX_HTML_PATH = "/index.html"; - private static final Set<String> HTML_PATHS = ImmutableSet.of(INDEX_HTML_PATH); + private static final Set<String> HTML_PATHS = Set.of(INDEX_HTML_PATH); private final Platform platform; - private final Configuration configuration; private final OfficialDistribution officialDistribution; private ServletContext servletContext; private Map<String, String> indexHtmlByPath; private Status status; - public WebPagesCache(Platform platform, Configuration configuration, OfficialDistribution officialDistribution) { + public WebPagesCache(Platform platform, OfficialDistribution officialDistribution) { this.platform = platform; - this.configuration = configuration; this.indexHtmlByPath = new HashMap<>(); this.officialDistribution = officialDistribution; } @@ -93,19 +87,17 @@ public class WebPagesCache { private String provide(String path) { getClass().getResourceAsStream(INDEX_HTML_PATH); - boolean isSonarCloud = configuration.getBoolean(SONARCLOUD_ENABLED.getKey()).orElse(false); - String instance = isSonarCloud ? SONARCLOUD_INSTANCE_VALUE : SONARQUBE_INSTANCE_VALUE; - return loadHtmlFile(path, status.name(), instance); + return loadHtmlFile(path, status.name()); } - private String loadHtmlFile(String path, String serverStatus, String instance) { + private String loadHtmlFile(String path, String serverStatus) { try (InputStream input = servletContext.getResourceAsStream(path)) { String template = IOUtils.toString(requireNonNull(input), UTF_8); return template - .replaceAll(WEB_CONTEXT_PLACEHOLDER, servletContext.getContextPath()) - .replaceAll(SERVER_STATUS_PLACEHOLDER, serverStatus) - .replaceAll(INSTANCE_PLACEHOLDER, instance) - .replaceAll(OFFICIAL_PLACEHOLDER, String.valueOf(officialDistribution.check())); + .replace(WEB_CONTEXT_PLACEHOLDER, servletContext.getContextPath()) + .replace(SERVER_STATUS_PLACEHOLDER, serverStatus) + .replace(INSTANCE_PLACEHOLDER, WebPagesCache.SONARQUBE_INSTANCE_VALUE) + .replace(OFFICIAL_PLACEHOLDER, String.valueOf(officialDistribution.check())); } catch (Exception e) { throw new IllegalStateException("Fail to load file " + path, e); } diff --git a/server/sonar-webserver/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java b/server/sonar-webserver/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java index fc1e8d030fc..fbd308bf5f3 100644 --- a/server/sonar-webserver/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java +++ b/server/sonar-webserver/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java @@ -24,7 +24,6 @@ import javax.servlet.ServletContext; import org.junit.Before; import org.junit.Test; import org.mockito.stubbing.Answer; -import org.sonar.api.config.internal.MapSettings; import org.sonar.server.platform.OfficialDistribution; import org.sonar.server.platform.Platform; @@ -45,11 +44,10 @@ public class WebPagesCacheTest { private ServletContext servletContext = mock(ServletContext.class); - private OfficialDistribution officialDistribution = mock(OfficialDistribution.class); - private Platform platform = mock(Platform.class); - private MapSettings mapSettings = new MapSettings(); + private final OfficialDistribution officialDistribution = mock(OfficialDistribution.class); + private final Platform platform = mock(Platform.class); - private WebPagesCache underTest = new WebPagesCache(platform, mapSettings.asConfig(), officialDistribution); + private final WebPagesCache underTest = new WebPagesCache(platform, officialDistribution); @Before public void setUp() { @@ -105,24 +103,6 @@ public class WebPagesCacheTest { } @Test - public void sonarcloud_setting_is_false() { - mapSettings.setProperty("sonar.sonarcloud.enabled", false); - doInit(); - - assertThat(underTest.getContent("/foo")) - .contains("SonarQube"); - } - - @Test - public void sonarcloud_setting_is_true() { - mapSettings.setProperty("sonar.sonarcloud.enabled", true); - doInit(); - - assertThat(underTest.getContent("/foo")) - .contains("SonarCloud"); - } - - @Test public void content_is_updated_when_status_has_changed() { doInit(); when(platform.status()).thenReturn(STARTING); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java index 213fc50f608..7aaf4b5eebe 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java @@ -163,7 +163,7 @@ public class DefaultSensorStorage implements SensorStorage { } if (!measure.isFromCore() && NEWLY_CORE_METRICS_KEYS.contains(measure.metric().key())) { - logOnce(measure.metric().key(), "Metric '{}' is an internal metric computed by SonarQube/SonarCloud. Provided value is ignored.", measure.metric().key()); + logOnce(measure.metric().key(), "Metric '{}' is an internal metric computed by SonarQube. Provided value is ignored.", measure.metric().key()); return; } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java index c852d1735c4..f6daaed28b1 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java @@ -65,7 +65,7 @@ public class FileSystemMediumTest { @Rule public ScannerMediumTester tester = new ScannerMediumTester() - .setEdition(SonarEdition.SONARCLOUD) + .setEdition(SonarEdition.COMMUNITY) .registerPlugin("xoo", new XooPlugin()) .addDefaultQProfile("xoo", "Sonar Way") .addDefaultQProfile("xoo2", "Sonar Way"); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/scm/ScmMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/scm/ScmMediumTest.java index 3de346c71aa..c4b149d73f8 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/scm/ScmMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/scm/ScmMediumTest.java @@ -62,7 +62,7 @@ public class ScmMediumTest { @Rule public ScannerMediumTester tester = new ScannerMediumTester() - .setEdition(SonarEdition.SONARCLOUD) + .setEdition(SonarEdition.COMMUNITY) .registerPlugin("xoo", new XooPlugin()) .addDefaultQProfile("xoo", "Sonar Way") .addRules(new XooRulesDefinition()) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersWsParameters.java index feacc9b2de9..9d7c9ea824d 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersWsParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersWsParameters.java @@ -27,7 +27,6 @@ public class UsersWsParameters { public static final String ACTION_CREATE = "create"; public static final String ACTION_DEACTIVATE = "deactivate"; public static final String ACTION_UPDATE = "update"; - public static final String ACTION_SKIP_ONBOARDING_TUTORIAL = "skip_onboarding_tutorial"; public static final String ACTION_CURRENT = "current"; public static final String ACTION_UPDATE_IDENTITY_PROVIDER = "update_identity_provider"; public static final String ACTION_DISMISS_SONARLINT_AD = "dismiss_sonarlint_ad"; diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java index b90eaecf034..f0b83571dd4 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java @@ -171,19 +171,6 @@ public class UsersService extends BaseService { * * This is part of the internal API. * This is a POST request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/skip_onboarding_tutorial">Further information about this action online (including a response example)</a> - * @since 6.5 - */ - public void skipOnboardingTutorial() { - call( - new PostRequest(path("skip_onboarding_tutorial")) - .setMediaType(MediaTypes.JSON)).content(); - } - - /** - * - * This is part of the internal API. - * This is a POST request. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/update">Further information about this action online (including a response example)</a> * @since 3.7 */ diff --git a/sonar-ws/src/main/protobuf/ws-users.proto b/sonar-ws/src/main/protobuf/ws-users.proto index ec2af94934e..52579c59150 100644 --- a/sonar-ws/src/main/protobuf/ws-users.proto +++ b/sonar-ws/src/main/protobuf/ws-users.proto @@ -107,7 +107,7 @@ message CurrentWsResponse { repeated string scmAccounts = 8; repeated string groups = 9; optional Permissions permissions = 10; - optional bool showOnboardingTutorial = 11; + reserved 11; // showOnboardingTutorial removed optional string avatar = 12; optional Homepage homepage = 13; reserved 15; // settings removed |