Skip to content

Commit

Permalink
fix: remove explicit ids for groups and users during setup (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Nov 2, 2019
1 parent d69dde1 commit b4cb824
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,12 @@ module.exports = () => {

WIKI.logger.info('Creating default groups...')
const adminGroup = await WIKI.models.groups.query().insert({
...(WIKI.config.db.type !== `mssql` && { id: 1 }),
name: 'Administrators',
permissions: JSON.stringify(['manage:system']),
pageRules: JSON.stringify([]),
isSystem: true
})
const guestGroup = await WIKI.models.groups.query().insert({
...(WIKI.config.db.type !== `mssql` && { id: 2 }),
name: 'Guests',
permissions: JSON.stringify(['read:pages', 'read:assets', 'read:comments']),
pageRules: JSON.stringify([
Expand Down Expand Up @@ -279,7 +277,6 @@ module.exports = () => {
// Create root administrator
WIKI.logger.info('Creating root administrator...')
const adminUser = await WIKI.models.users.query().insert({
...(WIKI.config.db.type !== `mssql` && { id: 1 }),
email: req.body.adminEmail,
provider: 'local',
password: req.body.adminPassword,
Expand All @@ -295,7 +292,6 @@ module.exports = () => {
// Create Guest account
WIKI.logger.info('Creating guest account...')
const guestUser = await WIKI.models.users.query().insert({
...(WIKI.config.db.type !== `mssql` && { id: 2 }),
provider: 'local',
email: 'guest@example.com',
name: 'Guest',
Expand Down

0 comments on commit b4cb824

Please sign in to comment.