FEATURE: Warn if invited user cannot see topic (#13548)
Users can invite people to topics from secured category, but they will not be redirected to the topic after signing up unless they have the permissions to view the topic. This commit shows a warning when invite is saved if the topic is in a secured category and none of the invite groups are allowed to see it.
This commit is contained in:
@@ -62,7 +62,12 @@ export default Component.extend({
|
||||
const modalAlert = document.getElementById("modal-alert");
|
||||
if (modalAlert) {
|
||||
modalAlert.style.display = "none";
|
||||
modalAlert.classList.remove("alert-info", "alert-error", "alert-success");
|
||||
modalAlert.classList.remove(
|
||||
"alert-error",
|
||||
"alert-info",
|
||||
"alert-success",
|
||||
"alert-warning"
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -99,10 +99,15 @@ export default Controller.extend(
|
||||
|
||||
return this.invite
|
||||
.save(data)
|
||||
.then(() => {
|
||||
.then((result) => {
|
||||
this.rollbackBuffer();
|
||||
this.setAutogenerated(opts.autogenerated);
|
||||
if (!this.autogenerated) {
|
||||
if (result.warnings) {
|
||||
this.appEvents.trigger("modal-body:flash", {
|
||||
text: result.warnings.join(","),
|
||||
messageClass: "warning",
|
||||
});
|
||||
} else if (!this.autogenerated) {
|
||||
if (this.isEmail && opts.sendEmail) {
|
||||
this.send("closeModal");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user