mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 13:03:39 +08:00
Site setting to allow mods to create categories
This commit is contained in:
parent
e4aadf2b1e
commit
b7caa33841
|
@ -656,6 +656,7 @@ en:
|
||||||
ga_universal_domain_name: "Google Universal Analytics (analytics.js) domain name, eg: mysite.com; see http://google.com/analytics"
|
ga_universal_domain_name: "Google Universal Analytics (analytics.js) domain name, eg: mysite.com; see http://google.com/analytics"
|
||||||
enable_escaped_fragments: "Fall back to Google's Ajax-Crawling API if a crawler is not detected."
|
enable_escaped_fragments: "Fall back to Google's Ajax-Crawling API if a crawler is not detected."
|
||||||
enable_noscript_support: "Enable standard webcrawler search engine support via the noscript tag"
|
enable_noscript_support: "Enable standard webcrawler search engine support via the noscript tag"
|
||||||
|
allow_moderators_to_create_categories: "Allow moderators to create new categories"
|
||||||
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|new|unread|starred|categories|top|read|posted"
|
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|new|unread|starred|categories|top|read|posted"
|
||||||
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
|
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
|
||||||
share_links: "Determine which items appear on the share dialog, and in what order. Example twitter|facebook|google+|email"
|
share_links: "Determine which items appear on the share dialog, and in what order. Example twitter|facebook|google+|email"
|
||||||
|
|
|
@ -345,6 +345,7 @@ security:
|
||||||
enable_escaped_fragments: true
|
enable_escaped_fragments: true
|
||||||
allow_index_in_robots_txt: true
|
allow_index_in_robots_txt: true
|
||||||
enable_noscript_support: true
|
enable_noscript_support: true
|
||||||
|
allow_moderators_to_create_categories: false
|
||||||
|
|
||||||
onebox:
|
onebox:
|
||||||
enable_flash_video_onebox: false
|
enable_flash_video_onebox: false
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module CategoryGuardian
|
module CategoryGuardian
|
||||||
# Creating Method
|
# Creating Method
|
||||||
def can_create_category?(parent)
|
def can_create_category?(parent)
|
||||||
is_admin?
|
is_admin? || (SiteSetting.allow_moderators_to_create_categories && is_moderator?)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Editing Method
|
# Editing Method
|
||||||
|
|
Loading…
Reference in New Issue
Block a user