mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
ba38509a1d
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module.exports = class Handler
|
||||||
hasAccessToDocument: (req, document, method=null) ->
|
hasAccessToDocument: (req, document, method=null) ->
|
||||||
return true if req.user?.isAdmin()
|
return true if req.user?.isAdmin()
|
||||||
if @modelClass.schema.uses_coco_permissions
|
if @modelClass.schema.uses_coco_permissions
|
||||||
return document.hasPermissionsForMethod(req.user, method or req.method)
|
return document.hasPermissionsForMethod?(req.user, method or req.method)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
formatEntity: (req, document) -> document?.toObject()
|
formatEntity: (req, document) -> document?.toObject()
|
||||||
|
|
Loading…
Reference in a new issue