nodebb-plugin-onekite-calendar 2.0.22 → 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 +6 -0
- package/lib/api.js +2 -1
- package/lib/helloassoWebhook.js +0 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
6
|
+
## 1.3.18
|
|
7
|
+
- Fix HelloAsso webhook : suppression d'une double déclaration `realtime` qui empêchait le plugin de se charger (SyntaxError).
|
|
8
|
+
|
|
3
9
|
## 1.3.17
|
|
4
10
|
- Temps réel : les **créations** (locations / évènements), **changements de statut** (validation, refus, annulation, paiement reçu) et **expirations** se répercutent automatiquement sur le calendrier pour **tous les utilisateurs connectés**, sans rechargement de page.
|
|
5
11
|
|
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/lib/helloassoWebhook.js
CHANGED
|
@@ -10,7 +10,6 @@ const dbLayer = require('./db');
|
|
|
10
10
|
const helloasso = require('./helloasso');
|
|
11
11
|
const discord = require('./discord');
|
|
12
12
|
const realtime = require('./realtime');
|
|
13
|
-
const realtime = require('./realtime');
|
|
14
13
|
|
|
15
14
|
async function auditLog(action, actorUid, payload) {
|
|
16
15
|
try {
|
package/package.json
CHANGED
package/plugin.json
CHANGED