|
@@ -15,7 +15,6 @@ module.exports = {
|
|
|
await mongoose.connect(getMongoUri(), mongoOptions);
|
|
await mongoose.connect(getMongoUri(), mongoOptions);
|
|
|
|
|
|
|
|
const isNewConfigExists = await Config.count({
|
|
const isNewConfigExists = await Config.count({
|
|
|
- ns: 'crowi',
|
|
|
|
|
key: 'security:pageDeletionAuthority',
|
|
key: 'security:pageDeletionAuthority',
|
|
|
}) > 0;
|
|
}) > 0;
|
|
|
|
|
|
|
@@ -26,7 +25,6 @@ module.exports = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const oldConfig = await Config.findOne({
|
|
const oldConfig = await Config.findOne({
|
|
|
- ns: 'crowi',
|
|
|
|
|
key: 'security:pageCompleteDeletionAuthority',
|
|
key: 'security:pageCompleteDeletionAuthority',
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -37,17 +35,14 @@ module.exports = {
|
|
|
await Config.insertMany(
|
|
await Config.insertMany(
|
|
|
[
|
|
[
|
|
|
{
|
|
{
|
|
|
- ns: 'crowi',
|
|
|
|
|
key: 'security:pageDeletionAuthority',
|
|
key: 'security:pageDeletionAuthority',
|
|
|
value: oldValue,
|
|
value: oldValue,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- ns: 'crowi',
|
|
|
|
|
key: 'security:pageRecursiveDeletionAuthority',
|
|
key: 'security:pageRecursiveDeletionAuthority',
|
|
|
value: `"${PageRecursiveDeleteConfigValue.Inherit}"`,
|
|
value: `"${PageRecursiveDeleteConfigValue.Inherit}"`,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- ns: 'crowi',
|
|
|
|
|
key: 'security:pageRecursiveCompleteDeletionAuthority',
|
|
key: 'security:pageRecursiveCompleteDeletionAuthority',
|
|
|
value: `"${PageRecursiveDeleteCompConfigValue.Inherit}"`,
|
|
value: `"${PageRecursiveDeleteCompConfigValue.Inherit}"`,
|
|
|
},
|
|
},
|