Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add posting restricted to mods #642

Merged
merged 2 commits into from
May 23, 2022
Merged

Conversation

dessalines
Copy link
Member

This adds the setting to the community form, as well as hides the create post button on the community for non-mods if the setting is enabled.

@@ -76,8 +76,7 @@ export class CreateCommunity extends Component<any, CreateCommunityState> {

parseMessage(msg: any) {
if (msg.error) {
// Toast errors are already handled by community-form
return;
toast(i18n.t(msg.error), "danger");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to fix a double error notification.

@dessalines dessalines requested a review from Nutomic April 29, 2022 18:24
return (
!this.props.community_view.community.posting_restricted_to_mods ||
this.canMod ||
this.canAdmin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canPost check.

@dessalines dessalines force-pushed the add_posting_restricted_to_mods branch from bf4054d to 2b87596 Compare May 23, 2022 19:22
@dessalines dessalines merged commit 2d0da58 into main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants