fix: give default privs on new install to guests/spiders

This commit is contained in:
Barış Soner Uşaklı
2019-02-05 12:14:02 -05:00
parent c72da5595a
commit cd1209906d
2 changed files with 11 additions and 2 deletions

View File

@@ -59,7 +59,6 @@
"allowProfileImageUploads": 1,
"teaserPost": "last-reply",
"allowPrivateGroups": 1,
"allowGroupCreation": 0,
"unreadCutoff": 2,
"bookmarkThreshold": 5,
"autoDetectLang": 1,

View File

@@ -388,7 +388,17 @@ function giveGlobalPrivileges(next) {
'search:users', 'search:tags', 'view:users', 'view:tags', 'view:groups',
'local:login',
];
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) {