mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 08:23:57 -04:00
Added access to unpublished levels for 'artisan' permissions.
This commit is contained in:
parent
e881aec7d7
commit
5128eae284
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue