Site setting to allow mods to create categories

This commit is contained in:
Sam 2014-04-15 16:42:24 +10:00
parent e4aadf2b1e
commit b7caa33841
3 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -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

View File

@ -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