Add posting restricted to mods (#642)

* Adding only mods can post. Fixes #641

* Fixing canPost check
This commit is contained in:
Dessalines 2022-05-23 15:22:15 -04:00 committed by GitHub
parent d4ca2085ad
commit 2d0da58793
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 17 deletions

View file

@ -636,7 +636,8 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
let op = wsUserOp(msg);
console.log(msg);
if (msg.error) {
toast(i18n.t(msg.error), "danger");
// Errors handled by top level pages
// toast(i18n.t(msg.error), "danger");
this.state.loading = false;
this.setState(this.state);
return;