codecombat/server/articles/article_handler.coffee

12 lines
296 B
CoffeeScript
Raw Normal View History

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