mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 21:08:36 +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"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
|
|
|
@ -345,6 +345,7 @@ security:
|
|||
enable_escaped_fragments: true
|
||||
allow_index_in_robots_txt: true
|
||||
enable_noscript_support: true
|
||||
allow_moderators_to_create_categories: false
|
||||
|
||||
onebox:
|
||||
enable_flash_video_onebox: false
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
module CategoryGuardian
|
||||
# Creating Method
|
||||
def can_create_category?(parent)
|
||||
is_admin?
|
||||
is_admin? || (SiteSetting.allow_moderators_to_create_categories && is_moderator?)
|
||||
end
|
||||
|
||||
# Editing Method
|
||||
|
|
Loading…
Reference in New Issue
Block a user