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

v1.18.x
Barış Soner Uşaklı 6 years ago
parent c72da5595a
commit cd1209906d

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

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

Loading…
Cancel
Save