initial look at indicating if user is not the owner

this does not fully work as the server does not update `isOwner` in the client when the user authenticates.
This commit is contained in:
Paul Rodwell
2016-11-30 10:29:38 +00:00
parent f7f34b2223
commit d84a282bb3
3 changed files with 10 additions and 3 deletions

View File

@ -133,6 +133,7 @@ module.exports = exports = (log, loga, argv) ->
else
try
idProvider = _.head(_.keys(req.session.passport.user))
console.log 'idProvider: ', idProvider
switch idProvider
when 'github', 'google', 'twitter'
if _.isEqual(owner[idProvider].id, req.session.passport.user[idProvider].id)