#22 Password protected shares
This commit is contained in:
@@ -11,7 +11,8 @@ public class MessageHelper {
|
||||
// We have to temporarily store messages as we redirect: in some methods
|
||||
// so everything we add to the model will be gone, that's why we store messages
|
||||
// temporarily in here
|
||||
private final List<String> errors = new ArrayList<>();
|
||||
private final List<String> errors = new ArrayList<>(); // not resolved against a bundle
|
||||
private final List<String> resolvableErrors = new ArrayList<>(); // messages that are resolved against a bundle
|
||||
private final List<String> shareInfo = new ArrayList<>();
|
||||
private final List<String> infoMessages = new ArrayList<>();
|
||||
|
||||
@@ -19,6 +20,7 @@ public class MessageHelper {
|
||||
model.addAttribute("errors", getAndClear(this.errors));
|
||||
model.addAttribute("infoMessages", getAndClear(this.infoMessages));
|
||||
model.addAttribute("shareInfo", getAndClear(this.shareInfo));
|
||||
model.addAttribute("resolvableErrors", getAndClear(this.resolvableErrors));
|
||||
}
|
||||
|
||||
private static List<String> getAndClear(List<String> source) {
|
||||
@@ -33,6 +35,10 @@ public class MessageHelper {
|
||||
this.errors.add(message);
|
||||
}
|
||||
|
||||
public void addResolvableError(String message) {
|
||||
this.resolvableErrors.add(message);
|
||||
}
|
||||
|
||||
public void addShare(String message) {
|
||||
this.shareInfo.add(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user