mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Hiding some ThangTypes from view in level editor.
This commit is contained in:
parent
306f599673
commit
891b78eb44
3 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ module.exports = class AddThangsView extends CocoView
|
|||
models = @supermodel.getModels(ThangType)
|
||||
|
||||
thangTypes = _.uniq models, false, (thangType) -> thangType.get('original')
|
||||
thangTypes = _.reject thangTypes, (thangType) -> thangType.get('kind') in ['Mark', 'Item']
|
||||
thangTypes = _.reject thangTypes, (thangType) -> thangType.get('kind') in ['Mark', 'Item', undefined]
|
||||
groupMap = {}
|
||||
for thangType in thangTypes
|
||||
kind = thangType.get('kind')
|
||||
|
|
|
@ -82,7 +82,7 @@ module.exports = class ThangsTabView extends CocoView
|
|||
return context unless @supermodel.finished()
|
||||
thangTypes = (thangType.attributes for thangType in @supermodel.getModels(ThangType))
|
||||
thangTypes = _.uniq thangTypes, false, 'original'
|
||||
thangTypes = _.reject thangTypes, kind: 'Mark'
|
||||
thangTypes = _.reject thangTypes, (tt) -> tt.kind in ['Mark', undefined]
|
||||
groupMap = {}
|
||||
for thangType in thangTypes
|
||||
groupMap[thangType.kind] ?= []
|
||||
|
|
|
@ -15,13 +15,13 @@ module.exports.setup = (app) ->
|
|||
|
||||
authentication.use(new LocalStrategy(
|
||||
(username, password, done) ->
|
||||
|
||||
|
||||
# kind of a hacky way to make it possible for iPads to 'log in' with their unique device id
|
||||
if username.length is 36 and '@' not in username # must be an identifier for vendor
|
||||
q = { iosIdentifierForVendor: username }
|
||||
else
|
||||
q = { emailLower: username.toLowerCase() }
|
||||
|
||||
|
||||
User.findOne(q).exec((err, user) ->
|
||||
return done(err) if err
|
||||
return done(null, false, {message: 'not found', property: 'email'}) if not user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue