mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 00:08:53 +02:00
private plugin link fix
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
'use strict';
|
||||
/* globals define, app, ajaxify */
|
||||
|
||||
define('forum/account/header', function() {
|
||||
var AccountHeader = {};
|
||||
|
||||
@@ -7,10 +10,11 @@ define('forum/account/header', function() {
|
||||
};
|
||||
|
||||
function displayAccountMenus() {
|
||||
$('.account-sub-links .plugin-link').each(function() {
|
||||
var $this = $(this);
|
||||
$this.toggleClass('hide', $this.hasClass('private'));
|
||||
});
|
||||
if (!app.user.uid || app.user.uid !== parseInt(ajaxify.variables.get('theirid'), 10)) {
|
||||
$('.account-sub-links .plugin-link.private').each(function() {
|
||||
$(this).addClass('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function selectActivePill() {
|
||||
|
||||
@@ -340,6 +340,7 @@ middleware.renderHeader = function(req, res, callback) {
|
||||
return;
|
||||
}
|
||||
results.user.isAdmin = results.isAdmin || false;
|
||||
results.user.uid = parseInt(results.user.uid, 10);
|
||||
results.user['email:confirmed'] = parseInt(results.user['email:confirmed'], 10) === 1;
|
||||
|
||||
templateValues.browserTitle = results.title;
|
||||
|
||||
Reference in New Issue
Block a user