nodebb-plugin-onekite-calendar 2.0.23 → 2.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/lib/api.js +2 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog – calendar-onekite
|
|
2
2
|
|
|
3
|
+
## 1.3.19
|
|
4
|
+
- Annulation : un validateur/gestionnaire peut désormais annuler **même sa propre** réservation après paiement (la restriction `cannot-cancel-paid` ne s'applique plus aux validateurs).
|
|
5
|
+
|
|
3
6
|
## 1.3.18
|
|
4
7
|
- Fix HelloAsso webhook : suppression d'une double déclaration `realtime` qui empêchait le plugin de se charger (SyntaxError).
|
|
5
8
|
|
package/lib/api.js
CHANGED
|
@@ -1315,7 +1315,8 @@ api.cancelReservation = async function (req, res) {
|
|
|
1315
1315
|
if (!isOwner && !canMod) return res.status(403).json({ error: 'not-allowed' });
|
|
1316
1316
|
|
|
1317
1317
|
const isPaid = String(r.status) === 'paid';
|
|
1318
|
-
|
|
1318
|
+
// Owners cannot cancel a paid reservation unless they also have validator rights.
|
|
1319
|
+
if (isOwner && isPaid && !canMod) return res.status(400).json({ error: 'cannot-cancel-paid' });
|
|
1319
1320
|
|
|
1320
1321
|
if (r.status === 'cancelled') return res.json({ ok: true, status: 'cancelled' });
|
|
1321
1322
|
|
package/package.json
CHANGED
package/plugin.json
CHANGED