Fix several minor security bugs.
This commit is contained in:
@@ -24,7 +24,7 @@ public class RestCollaboration {
|
||||
|
||||
public RestCollaboration(@NotNull Collaboration collaboration) {
|
||||
this.email = collaboration.getCollaborator().getEmail();
|
||||
this.role = collaboration.getRole().name();
|
||||
this.role = collaboration.getRole().getLabel();
|
||||
}
|
||||
|
||||
public RestCollaboration() {
|
||||
|
@@ -166,12 +166,16 @@ public class MindmapServiceImpl
|
||||
mindmap.getCollaborations().add(collaboration);
|
||||
mindmapManager.saveMindmap(mindmap);
|
||||
|
||||
// Sent collaboration email ...
|
||||
final Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("role", role);
|
||||
model.put("map", mindmap);
|
||||
model.put("message", "message");
|
||||
mailer.sendEmail(mailer.getSiteEmail(), email, "Collaboration", model, "newColaborator.vm");
|
||||
try {
|
||||
// Sent collaboration email ...
|
||||
final Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("role", role);
|
||||
model.put("map", mindmap);
|
||||
model.put("message", "message");
|
||||
mailer.sendEmail(mailer.getSiteEmail(), email, "Collaboration", model, "newColaborator.vm");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (collaboration.getRole() != role) {
|
||||
// If the relationship already exists and the role changed then only update the role
|
||||
|
Reference in New Issue
Block a user