mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Remove username from the mindmap info.
This commit is contained in:
parent
9257638da2
commit
1ac80626b4
@ -39,7 +39,7 @@ public class MindmapManagerImpl
|
||||
final Collaborator collaborator;
|
||||
final List<Collaborator> collaborators = getHibernateTemplate().find("from com.wisemapping.model.Collaborator collaborator where email=?", email);
|
||||
if (collaborators != null && !collaborators.isEmpty()) {
|
||||
assert collaborators.size() == 1 : "More than one user with the same username!";
|
||||
assert collaborators.size() == 1 : "More than one user with the same email!";
|
||||
collaborator = collaborators.get(0);
|
||||
} else {
|
||||
collaborator = null;
|
||||
|
@ -22,7 +22,6 @@ public class Constants {
|
||||
|
||||
public static final int MAX_MAP_NAME_LENGTH = 512;
|
||||
public static final int MAX_MAP_DESCRIPTION_LENGTH = 512;
|
||||
public static final int MAX_USER_USERNAME_LENGTH = 255;
|
||||
public static final int MAX_USER_LASTNAME_LENGTH = 255;
|
||||
public static final int MAX_USER_FIRSTNAME_LENGTH = 255;
|
||||
public static final int MAX_USER_PASSWORD_LENGTH = 255;
|
||||
|
@ -404,7 +404,6 @@ public class MindmapController extends BaseController {
|
||||
}
|
||||
|
||||
// Save new map ...
|
||||
final User user = Utils.getUser();
|
||||
createMap(new RestMindmap(mindMap, null), response, title, description);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class UserServiceImpl
|
||||
return user;
|
||||
}
|
||||
|
||||
private MindMap buildWelcomeMindmap(@NotNull String username) throws WiseMappingException {
|
||||
private MindMap buildWelcomeMindmap(@NotNull String firstName) throws WiseMappingException {
|
||||
//To change body of created methods use File | Settings | File Templates.
|
||||
final Locale locale = LocaleContextHolder.getLocale();
|
||||
MindMap result = new MindMap();
|
||||
@ -155,7 +155,7 @@ public class UserServiceImpl
|
||||
try {
|
||||
final byte[] bytes = IOUtils.toByteArray(resourceAsStream);
|
||||
result.setXml(bytes);
|
||||
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + username);
|
||||
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + firstName);
|
||||
result.setDescription("");
|
||||
|
||||
} catch (IOException e) {
|
||||
|
@ -21,7 +21,6 @@ package com.wisemapping.validator;
|
||||
public interface Messages {
|
||||
String EMAIL_ALREADY_EXIST = "EMAIL_ALREADY_EXIST";
|
||||
String NO_VALID_EMAIL_ADDRESS = "NO_VALID_EMAIL_ADDRESS";
|
||||
String USERNAME_ALREADY_EXIST = "USERNAME_ALREADY_EXIST";
|
||||
String FIELD_REQUIRED = "FIELD_REQUIRED";
|
||||
String IMPORT_MAP_ERROR = "IMPORT_MAP_ERROR";
|
||||
String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS";
|
||||
|
@ -18,17 +18,14 @@
|
||||
<input type="text" name="password" id="email" required="required" readonly="readonly"
|
||||
value="${user.email}"/>
|
||||
|
||||
<label for="userName"><strong><spring:message code="USERNAME"/>:</strong></label>
|
||||
<input type="text" name="password" id="userName" required="required" value="${user.username}"
|
||||
readonly="readonly"/>
|
||||
|
||||
<label for="firstname"><strong><spring:message code="FIRSTNAME"/>:</strong></label>
|
||||
<input type="text" name="firstname" id="firstname" required="required" value="${user.firstname}"/>
|
||||
|
||||
<label for="lastname"><strong><spring:message code="LASTNAME"/>:</strong></label>
|
||||
<input type="text" name="lastname" id="lastname" required="required" value="${user.lastname}"/>
|
||||
<br/>
|
||||
<input type="submit" id="changeUserInfoBtn" class="btn btn-primary" value="<spring:message code="SAVE_CHANGES"/>"/>
|
||||
<input type="submit" id="changeUserInfoBtn" class="btn btn-primary"
|
||||
value="<spring:message code="SAVE_CHANGES"/>"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class JsonTest {
|
||||
String json2 = "{\"title\":\"some title\",\"description\":\"description here\"}";
|
||||
mapper.readValue(json2, RestMindmap.class);
|
||||
|
||||
String userJson = "{\"username\":\"admin\",\"email\":\"admin@wisemapping.org\",\"tags\":[],\"creationDate\":1329706800000,\"firstname\":\"Wise\",\"lastname\":\"test\",\"password\":\"test\"}";
|
||||
String userJson = "{\"email\":\"admin@wisemapping.org\",\"tags\":[],\"creationDate\":1329706800000,\"firstname\":\"Wise\",\"lastname\":\"test\",\"password\":\"test\"}";
|
||||
final RestUser restUser = mapper.readValue(userJson, RestUser.class);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user