Added access to unpublished levels for 'artisan' permissions.

This commit is contained in:
Nick Winter 2015-02-26 15:21:08 -08:00
parent e881aec7d7
commit 5128eae284

View file

@ -345,11 +345,11 @@ LevelHandler = class LevelHandler extends Handler
@sendSuccess res, data @sendSuccess res, data
hasAccessToDocument: (req, document, method=null) -> hasAccessToDocument: (req, document, method=null) ->
return true if req.user?.isArtisan()
method ?= req.method method ?= req.method
return true if method is null or method is 'get' return true if method is null or method is 'get'
super(req, document, method) super(req, document, method)
getLevelPlaytimesBySlugs: (req, res) -> getLevelPlaytimesBySlugs: (req, res) ->
# Returns an array of per-day level average playtimes # Returns an array of per-day level average playtimes
# Parameters: # Parameters: