codecombat/server/articles/article_handler.coffee
2014-03-08 05:05:35 +04:00

11 lines
304 B
CoffeeScript

Article = require('./Article')
Handler = require('../commons/Handler')
ArticleHandler = class ArticleHandler extends Handler
modelClass: Article
editableProperties: ['body', 'name', 'i18n']
hasAccess: (req) ->
req.method is 'GET' or req.user?.isAdmin()
module.exports = new ArticleHandler()