fix: Rename user company to user's useCase (#7093)

We're not going to be collecting the company name for the self-hosted installation, but instead we'll be collecting the use-case that is being solved with Appsmith.
This commit is contained in:
Shrikant Sharat Kandula 2021-09-06 12:28:47 +05:30 committed by GitHub
parent 3adfaa5872
commit 0a08f9b807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ package com.appsmith.server.constants;
*/
public class ConfigNames {
public static final String COMPANY_NAME = "company-name";
public static final String USE_CASE = "use-case";
// Disallow instantiation of this class.
private ConfigNames() {}

View File

@ -21,7 +21,7 @@ public class UserSignupRequestDTO {
private String role;
private String companyName;
private String useCase;
private boolean allowCollectingAnonymousData;

View File

@ -218,7 +218,7 @@ public class UserSignup {
return Mono.when(
userDataService.updateForUser(user, userData),
configService.save(ConfigNames.COMPANY_NAME, Map.of("value", userFromRequest.getCompanyName())),
configService.save(ConfigNames.USE_CASE, Map.of("value", userFromRequest.getUseCase())),
analyticsService.sendObjectEvent(AnalyticsEvents.CREATE_SUPERUSER, user, null)
).thenReturn(user);
});
@ -239,8 +239,8 @@ public class UserSignup {
if (formData.containsKey("role")) {
user.setRole(formData.getFirst("role"));
}
if (formData.containsKey("companyName")) {
user.setCompanyName(formData.getFirst("companyName"));
if (formData.containsKey("useCase")) {
user.setUseCase(formData.getFirst("useCase"));
}
if (formData.containsKey("allowCollectingAnonymousData")) {
user.setAllowCollectingAnonymousData("true".equals(formData.getFirst("allowCollectingAnonymousData")));