feat: core improvements + local fs provider + UI fixes

This commit is contained in:
NGPixel
2018-07-29 22:23:33 -04:00
parent 803d86ff63
commit 2817c72ec3
65 changed files with 482 additions and 264 deletions

View File

@@ -15,7 +15,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, function (accessToken, refreshToken, profile, cb) {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -20,7 +20,7 @@ module.exports = {
let waadProfile = jwt.decode(params.id_token)
waadProfile.id = waadProfile.oid
waadProfile.provider = 'azure'
WIKI.db.users.processProfile(waadProfile).then((user) => {
WIKI.models.users.processProfile(waadProfile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -13,7 +13,7 @@ module.exports = {
ssoBaseURL: conf.ssoBaseURL,
serverBaseURL: conf.serverBaseURL
}, (profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -15,7 +15,7 @@ module.exports = {
callbackURL: conf.callbackURL,
scope: 'identify email'
}, function (accessToken, refreshToken, profile, cb) {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -15,7 +15,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, (accessToken, refreshToken, profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -15,7 +15,7 @@ module.exports = {
callbackURL: conf.callbackURL,
profileFields: ['id', 'displayName', 'email']
}, function (accessToken, refreshToken, profile, cb) {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -15,7 +15,7 @@ module.exports = {
callbackURL: conf.callbackURL,
scope: ['user:email']
}, (accessToken, refreshToken, profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -14,7 +14,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, (accessToken, refreshToken, profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -29,7 +29,7 @@ module.exports = {
}, (profile, cb) => {
profile.provider = 'ldap'
profile.id = profile.dn
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -13,7 +13,7 @@ module.exports = {
usernameField: 'email',
passwordField: 'password'
}, (uEmail, uPassword, done) => {
WIKI.db.users.query().findOne({
WIKI.models.users.query().findOne({
email: uEmail,
providerKey: 'local'
}).then((user) => {

View File

@@ -14,7 +14,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, function (accessToken, refreshToken, profile, cb) {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -16,7 +16,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, (accessToken, refreshToken, profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -14,7 +14,7 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, (accessToken, refreshToken, profile, cb) => {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true

View File

@@ -15,7 +15,7 @@ module.exports = {
callbackURL: conf.callbackURL,
scope: 'user_read'
}, function (accessToken, refreshToken, profile, cb) {
WIKI.db.users.processProfile(profile).then((user) => {
WIKI.models.users.processProfile(profile).then((user) => {
return cb(null, user) || true
}).catch((err) => {
return cb(err, null) || true