From cd1209906d42395e1bcf4faa81c27ce83086e957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 5 Feb 2019 12:14:02 -0500 Subject: [PATCH] fix: give default privs on new install to guests/spiders --- install/data/defaults.json | 1 - src/install.js | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 717d4eae52..2d2ff5cbad 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -59,7 +59,6 @@ "allowProfileImageUploads": 1, "teaserPost": "last-reply", "allowPrivateGroups": 1, - "allowGroupCreation": 0, "unreadCutoff": 2, "bookmarkThreshold": 5, "autoDetectLang": 1, diff --git a/src/install.js b/src/install.js index 1397dac31a..f95795e822 100644 --- a/src/install.js +++ b/src/install.js @@ -388,7 +388,17 @@ function giveGlobalPrivileges(next) { 'search:users', 'search:tags', 'view:users', 'view:tags', 'view:groups', 'local:login', ]; - privileges.global.give(defaultPrivileges, 'registered-users', next); + async.waterfall([ + function (next) { + privileges.global.give(defaultPrivileges, 'registered-users', next); + }, + function (next) { + privileges.global.give(['view:users', 'view:tags', 'view:groups'], 'guests', next); + }, + function (next) { + privileges.global.give(['view:users', 'view:tags', 'view:groups'], 'spiders', next); + }, + ], next); } function createCategories(next) {