Node.js based forum software built for the modern web
fix: give default privs on new install to guests/spiders
Barış Soner Uşaklıcd1209906d42
diff --git a/install/data/defaults.json b/install/data/defaults.jsonindex 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.jsindex 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) {