aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/initializers/migrations/0015-admin-role.js
blob: af06dca9e751dba55fe3081fb346a008356f4064 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                   
/*
  Set the admin role to the root user.
*/

const constants = require('../constants')
const mongoose = require('mongoose')

const User = mongoose.model('User')

exports.up = function (callback) {
  User.update({ username: 'root' }, { role: constants.USER_ROLES.ADMIN }, callback)
}

exports.down = function (callback) {
  throw new Error('Not implemented.')
}