This commit is contained in:
Nick Winter 2014-04-13 15:29:22 -07:00
commit ba38509a1d

View file

@ -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()