Quick fix for crashing server
Undo when investigating which schema does this
This commit is contained in:
parent
0ce04b147d
commit
e32524536e
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()
|
||||||
|
|
Reference in a new issue