mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 16:17:57 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
60076d09c1
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ module.exports = class Handler
|
|||
allowedMethods: ['GET', 'POST', 'PUT', 'PATCH']
|
||||
|
||||
constructor: ->
|
||||
# TODO The second 'or' is for backward compatibility only is for backward compatibility only
|
||||
# TODO The second 'or' is for backward compatibility only
|
||||
@privateProperties = @modelClass?.privateProperties or @privateProperties or []
|
||||
@editableProperties = @modelClass?.editableProperties or @editableProperties or []
|
||||
@postEditableProperties = @modelClass?.postEditableProperties or @postEditableProperties or []
|
||||
|
|
|
@ -7,7 +7,7 @@ hipchat = require '../hipchat'
|
|||
module.exports.setup = (app) ->
|
||||
# This is hacky and should probably get moved somewhere else, I dunno
|
||||
app.get '/db/cla.submissions', (req, res) ->
|
||||
return errors.unauthorized(res, 'You must be an admin to view that information') unless req.user?.isAdmin() or ('github' in req.user?.permissions ? [])
|
||||
return errors.unauthorized(res, 'You must be an admin to view that information') unless req.user?.isAdmin() or ('github' in (req.user?.get('permissions') ? []))
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
collection = mongoose.connection.db.collection 'cla.submissions', (err, collection) ->
|
||||
return log.error "Couldn't fetch CLA submissions because #{err}" if err
|
||||
|
|
Loading…
Reference in a new issue