feat: local disk import all action + v1 import content (#1100)

This commit is contained in:
Nicolas Giard authored and GitHub committed 2019-10-14 23:44:37 -04:00
1 parent 334d0a754e
commit cffd32dee0
8 files changed
+140 -51

No files matched your search

+10
View File
@@ -712,4 +712,14 @@ module.exports = class User extends Model {
user.permissions = user.getGlobalPermissions()
return user
}
static async getRootUser () {
let user = await WIKI.models.users.query().findById(1)
if (!user) {
WIKI.logger.error('CRITICAL ERROR: Root Administrator user is missing!')
process.exit(1)
}
user.permissions = ['manage:system']
return user
}
}