Add option to limit community creation to admins only (fixes #1586)#1587
Merged
dessalines merged 2 commits intomainfrom Apr 22, 2021
Merged
Add option to limit community creation to admins only (fixes #1586)#1587dessalines merged 2 commits intomainfrom
dessalines merged 2 commits intomainfrom
Conversation
dessalines
requested changes
Apr 21, 2021
|
|
||
| let site = blocking(context.pool(), move |conn| Site::read(conn, 0)).await??; | ||
| if site.community_creation_admin_only && is_admin(&local_user_view).is_err() { | ||
| return Err(ApiError::err("only_admins_can_create_communities").into()); |
Member
There was a problem hiding this comment.
I'll add this to lemmy-translations
Comment on lines
72
to
+75
| pub open_registration: bool, | ||
| pub enable_nsfw: bool, | ||
| pub auth: String, | ||
| pub community_creation_admin_only: bool, |
Member
There was a problem hiding this comment.
Side point, but since all of these have defaults, I can probably make them optional.
Member
Author
|
Updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quite easy to implement, and its something that has been requested a lot. Maybe the variable could have a better name.