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
f9e10d51
Commit
f9e10d51
authored
Sep 27, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: force user ids during setup
parent
c7d64734
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
setup.js
server/setup.js
+6
-2
No files found.
server/setup.js
View file @
f9e10d51
...
...
@@ -212,12 +212,14 @@ module.exports = () => {
WIKI
.
logger
.
info
(
'Creating default groups...'
)
const
adminGroup
=
await
WIKI
.
models
.
groups
.
query
().
insert
({
id
:
1
,
name
:
'Administrators'
,
permissions
:
JSON
.
stringify
([
'manage:system'
]),
pageRules
:
JSON
.
stringify
([]),
isSystem
:
true
})
const
guestGroup
=
await
WIKI
.
models
.
groups
.
query
().
insert
({
id
:
2
,
name
:
'Guests'
,
permissions
:
JSON
.
stringify
([
'read:pages'
,
'read:assets'
,
'read:comments'
]),
pageRules
:
JSON
.
stringify
([
...
...
@@ -254,8 +256,9 @@ module.exports = () => {
await
WIKI
.
models
.
users
.
query
().
delete
().
where
({
providerKey
:
'local'
,
email
:
req
.
body
.
adminEmail
})
})
.
orWhere
(
'id'
,
1
)
const
adminUser
=
await
WIKI
.
models
.
users
.
query
().
insert
({
id
:
1
,
email
:
req
.
body
.
adminEmail
,
provider
:
'local'
,
password
:
req
.
body
.
adminPassword
,
...
...
@@ -273,8 +276,9 @@ module.exports = () => {
await
WIKI
.
models
.
users
.
query
().
delete
().
where
({
providerKey
:
'local'
,
email
:
'guest@example.com'
})
})
.
orWhere
(
'id'
,
2
)
const
guestUser
=
await
WIKI
.
models
.
users
.
query
().
insert
({
id
:
2
,
provider
:
'local'
,
email
:
'guest@example.com'
,
name
:
'Guest'
,
...
...
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