Commit 77989b5b authored by Alexandros Georgantas's avatar Alexandros Georgantas

Merge branch 'users' into 'master'

fix(app): no users delete

See merge request editoria/ucp!20
parents cc5d7184 452ab5f1
......@@ -853,7 +853,7 @@ module.exports = {
return false
},
delete: true,
delete: false,
read: (userId, operation, object, context) => {
const mode = new EditoriaMode(userId, operation, object, context)
mode.backend = true
......
const logger = require('@pubsweet/logger')
const { User } = require('@pubsweet/models')
const createAdmin = async userData => {
logger.info('Creating user', userData.username)
const user = new User(userData)
await user.save()
logger.info(`Successfully added user: ${user.username}`)
return user
}
module.exports = createAdmin
createAdmin({
username: 'admin1',
password: 'password',
email: 'admin1@example.com',
admin: true,
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment