mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Hotfix for CLA submissions permissions
This commit is contained in:
parent
c408196814
commit
b0865ce3d1
1 changed files with 1 additions and 0 deletions
|
@ -6,6 +6,7 @@ mongoose = require 'mongoose'
|
|||
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()
|
||||
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