Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
a1b6dfb3
Commit
a1b6dfb3
authored
Jun 24, 2017
by
NGPixel
Committed by
Nicolas Giard
Jul 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Incorrect indentation (eslint)
parent
f37cbac3
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
20 deletions
+12
-20
settings.json
.vscode/settings.json
+2
-2
auth.js
server/libs/auth.js
+9
-17
db.js
server/libs/db.js
+1
-1
entries.js
server/libs/entries.js
+0
-0
index.js
server/libs/search-index/index.js
+0
-0
search.js
server/libs/search.js
+0
-0
system.js
server/libs/system.js
+0
-0
uploads-agent.js
server/libs/uploads-agent.js
+0
-0
No files found.
.vscode/settings.json
View file @
a1b6dfb3
{
"eslint.enable"
:
true
,
"eslint.autoFixOnSave"
:
fals
e
,
"eslint.autoFixOnSave"
:
tru
e
,
"puglint.enable"
:
true
,
"standard.enable"
:
false
,
"editor.formatOnSave"
:
tru
e
,
"editor.formatOnSave"
:
fals
e
,
"editor.tabSize"
:
2
}
server/libs/auth.js
View file @
a1b6dfb3
...
...
@@ -32,8 +32,7 @@ module.exports = function (passport) {
new
LocalStrategy
({
usernameField
:
'email'
,
passwordField
:
'password'
},
(
uEmail
,
uPassword
,
done
)
=>
{
},
(
uEmail
,
uPassword
,
done
)
=>
{
db
.
User
.
findOne
({
email
:
uEmail
,
provider
:
'local'
}).
then
((
user
)
=>
{
if
(
user
)
{
return
user
.
validatePassword
(
uPassword
).
then
(()
=>
{
...
...
@@ -60,8 +59,7 @@ module.exports = function (passport) {
clientID
:
appconfig
.
auth
.
google
.
clientId
,
clientSecret
:
appconfig
.
auth
.
google
.
clientSecret
,
callbackURL
:
appconfig
.
host
+
'/login/google/callback'
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
return
cb
(
null
,
user
)
||
true
}).
catch
((
err
)
=>
{
...
...
@@ -80,8 +78,7 @@ module.exports = function (passport) {
clientID
:
appconfig
.
auth
.
microsoft
.
clientId
,
clientSecret
:
appconfig
.
auth
.
microsoft
.
clientSecret
,
callbackURL
:
appconfig
.
host
+
'/login/ms/callback'
},
function
(
accessToken
,
refreshToken
,
profile
,
cb
)
{
},
function
(
accessToken
,
refreshToken
,
profile
,
cb
)
{
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
return
cb
(
null
,
user
)
||
true
}).
catch
((
err
)
=>
{
...
...
@@ -101,8 +98,7 @@ module.exports = function (passport) {
clientSecret
:
appconfig
.
auth
.
facebook
.
clientSecret
,
callbackURL
:
appconfig
.
host
+
'/login/facebook/callback'
,
profileFields
:
[
'id'
,
'displayName'
,
'email'
]
},
function
(
accessToken
,
refreshToken
,
profile
,
cb
)
{
},
function
(
accessToken
,
refreshToken
,
profile
,
cb
)
{
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
return
cb
(
null
,
user
)
||
true
}).
catch
((
err
)
=>
{
...
...
@@ -121,9 +117,8 @@ module.exports = function (passport) {
clientID
:
appconfig
.
auth
.
github
.
clientId
,
clientSecret
:
appconfig
.
auth
.
github
.
clientSecret
,
callbackURL
:
appconfig
.
host
+
'/login/github/callback'
,
scope
:
[
'user:email'
]
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
scope
:
[
'user:email'
]
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
return
cb
(
null
,
user
)
||
true
}).
catch
((
err
)
=>
{
...
...
@@ -142,8 +137,7 @@ module.exports = function (passport) {
clientID
:
appconfig
.
auth
.
slack
.
clientId
,
clientSecret
:
appconfig
.
auth
.
slack
.
clientSecret
,
callbackURL
:
appconfig
.
host
+
'/login/slack/callback'
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
},
(
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
return
cb
(
null
,
user
)
||
true
}).
catch
((
err
)
=>
{
...
...
@@ -174,8 +168,7 @@ module.exports = function (passport) {
},
usernameField
:
'email'
,
passReqToCallback
:
false
},
(
profile
,
cb
)
=>
{
},
(
profile
,
cb
)
=>
{
profile
.
provider
=
'ldap'
profile
.
id
=
profile
.
dn
db
.
User
.
processProfile
(
profile
).
then
((
user
)
=>
{
...
...
@@ -199,8 +192,7 @@ module.exports = function (passport) {
callbackURL
:
appconfig
.
host
+
'/login/azure/callback'
,
resource
:
appconfig
.
auth
.
azure
.
resource
,
tenant
:
appconfig
.
auth
.
azure
.
tenant
},
(
accessToken
,
refreshToken
,
params
,
profile
,
cb
)
=>
{
},
(
accessToken
,
refreshToken
,
params
,
profile
,
cb
)
=>
{
let
waadProfile
=
jwt
.
decode
(
params
.
id_token
)
waadProfile
.
id
=
waadProfile
.
oid
waadProfile
.
provider
=
'azure'
...
...
server/libs/db.js
View file @
a1b6dfb3
...
...
@@ -19,7 +19,7 @@ module.exports = {
*
* @return {Object} DB instance
*/
init
()
{
init
()
{
let
self
=
this
let
dbModelsPath
=
path
.
join
(
SERVERPATH
,
'models'
)
...
...
server/libs/entries.js
View file @
a1b6dfb3
server/libs/search-index/index.js
View file @
a1b6dfb3
server/libs/search.js
View file @
a1b6dfb3
server/libs/system.js
View file @
a1b6dfb3
server/libs/uploads-agent.js
View file @
a1b6dfb3
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment