mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
feat: allow disabling of GDPR features via ACP toggle, closes #6847
This commit is contained in:
@@ -51,32 +51,32 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
|
||||
user.getIPs(uid, 4, next);
|
||||
},
|
||||
profile_menu: function (next) {
|
||||
plugins.fireHook('filter:user.profileMenu', {
|
||||
uid: uid,
|
||||
callerUID: callerUID,
|
||||
links: [{
|
||||
id: 'info',
|
||||
route: 'info',
|
||||
name: '[[user:account_info]]',
|
||||
visibility: {
|
||||
self: false,
|
||||
other: false,
|
||||
moderator: true,
|
||||
globalMod: true,
|
||||
admin: true,
|
||||
},
|
||||
}, {
|
||||
id: 'sessions',
|
||||
route: 'sessions',
|
||||
name: '[[pages:account/sessions]]',
|
||||
visibility: {
|
||||
self: true,
|
||||
other: false,
|
||||
moderator: false,
|
||||
globalMod: false,
|
||||
admin: false,
|
||||
},
|
||||
}, {
|
||||
const links = [{
|
||||
id: 'info',
|
||||
route: 'info',
|
||||
name: '[[user:account_info]]',
|
||||
visibility: {
|
||||
self: false,
|
||||
other: false,
|
||||
moderator: true,
|
||||
globalMod: true,
|
||||
admin: true,
|
||||
},
|
||||
}, {
|
||||
id: 'sessions',
|
||||
route: 'sessions',
|
||||
name: '[[pages:account/sessions]]',
|
||||
visibility: {
|
||||
self: true,
|
||||
other: false,
|
||||
moderator: false,
|
||||
globalMod: false,
|
||||
admin: false,
|
||||
},
|
||||
}];
|
||||
|
||||
if (meta.config.gdpr_enabled) {
|
||||
links.push({
|
||||
id: 'consent',
|
||||
route: 'consent',
|
||||
name: '[[user:consent.title]]',
|
||||
@@ -87,7 +87,13 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
|
||||
globalMod: false,
|
||||
admin: false,
|
||||
},
|
||||
}],
|
||||
});
|
||||
}
|
||||
|
||||
plugins.fireHook('filter:user.profileMenu', {
|
||||
uid: uid,
|
||||
callerUID: callerUID,
|
||||
links: links,
|
||||
}, next);
|
||||
},
|
||||
groups: function (next) {
|
||||
|
||||
Reference in New Issue
Block a user