'Get the rules for the current subreddit'

@require_oauth2_scope('read')
@api_doc(api_section.subreddits, uri='/r/{subreddit}/about/rules')
def GET_rules(self):

    if (not feature.is_enabled('subreddit_rules', subreddit=c.site.name)):
        abort(404)
    if isinstance(c.site, FakeSubreddit):
        abort(404)
    kind_labels = {'all': _('Posts    &    Comments'), 'link': _('Posts    only'), 'comment': _('Comments    only')}
    title_string = (_('Rules    for    r/%(subreddit)s') % {'subreddit': c.site.name})
    content = Rules(title=title_string, kind_labels=kind_labels)
    extra_js_config = {'kind_labels': kind_labels}
    return ModToolsPage(title=title_string, content=content, extra_js_config=extra_js_config).render()
