mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-30 07:53:45 -04:00
Fixing #1866.
This commit is contained in:
parent
5272f9d9ba
commit
c628eff272
1 changed files with 2 additions and 2 deletions
|
@ -37,13 +37,13 @@ ThangTypeHandler = class ThangTypeHandler extends Handler
|
||||||
]
|
]
|
||||||
|
|
||||||
hasAccess: (req) ->
|
hasAccess: (req) ->
|
||||||
req.method in ['GET', 'PUT'] or req.user?.isAdmin()
|
req.method in ['GET', 'POST'] or req.user?.isAdmin()
|
||||||
|
|
||||||
hasAccessToDocument: (req, document, method=null) ->
|
hasAccessToDocument: (req, document, method=null) ->
|
||||||
method = (method or req.method).toLowerCase()
|
method = (method or req.method).toLowerCase()
|
||||||
return true if method is 'get'
|
return true if method is 'get'
|
||||||
return true if req.user?.isAdmin()
|
return true if req.user?.isAdmin()
|
||||||
return true if method is 'put' and @isJustFillingTranslations(req, document)
|
return true if method is 'post' and @isJustFillingTranslations(req, document)
|
||||||
return
|
return
|
||||||
|
|
||||||
get: (req, res) ->
|
get: (req, res) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue