when hiding name from public logs, also hide in ban page to banned user. close #374

jschan
Thomas Lynch 3 years ago
parent 9e62be3404
commit b8df980d40
  1. 1
      models/forms/addban.js
  2. 2
      views/mixins/ban.pug

@ -24,6 +24,7 @@ module.exports = async (req, res, redirect) => {
'board': req.params.board || null,
'posts': null,
'issuer': req.session.user,
'showUser': req.body.hide_name != null,
'date': actionDate,
'expireAt': new Date(actionDate.getTime() + (req.body.ban_duration || defaultBanDuration)),
'allowAppeal': req.body.no_appeal ? false : true,

@ -13,7 +13,7 @@ mixin ban(ban, banpage)
- const ip = permLevel > ipHashPermLevel ? ban.ip.single.slice(-10) : ban.ip.raw;
td #{ip}
td #{ban.type}
td #{ban.issuer}
td #{(!banpage || ban.showUser === true) ? ban.issuer : 'Hidden User'}
- const banDate = new Date(ban.date);
td: time.right.reltime(datetime=banDate.toISOString()) #{banDate.toLocaleString(undefined, {hourCycle:'h23'})}
- const expireDate = new Date(ban.expireAt);

Loading…
Cancel
Save