(feature)(profile) cards backup - disallow banned users

This commit is contained in:
Andrea Vos 2023-10-07 16:15:35 +02:00
parent bad7f12ad8
commit 84269657d3
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@
<CircleMentions/>
<CardsBackup/>
<CardsBackup v-if="!$user().bannedReason"/>
<section class="mt-5">
<a href="#" class="badge bg-light text-dark border" @click.prevent="logout">

View File

@ -857,7 +857,7 @@ router.post('/profile/remove-self-circle/:username', handleErrorAsync(async (req
}));
router.get('/profile/export', handleErrorAsync(async (req, res) => {
if (!req.user) {
if (!req.user || req.user.bannedReason) {
return res.status(401).json({error: 'Unauthorised'});
}