Azure AD support + defaultReadAccess option + All Pages UI work

This commit is contained in:
NGPixel
2017-04-09 21:13:53 -04:00
parent 5a010f224f
commit 7c1dd8b92a
17 changed files with 206 additions and 116 deletions

View File

@@ -72,9 +72,8 @@ userSchema.statics.processProfile = (profile) => {
}, {
new: true
}).then((user) => {
// LDAP - Handle unregistered accounts
// Todo: Allow this behavior for any provider...
if (!user && profile.provider === 'ldap') {
// Handle unregistered accounts
if (!user && profile.provider !== 'local' && (appconfig.auth.defaultReadAccess || profile.provider === 'ldap' || profile.provider === 'azure')) {
let nUsr = {
email: primaryEmail,
provider: profile.provider,