Skip to content

Commit

Permalink
fix problem adding reservation (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-bellenghi authored Nov 13, 2023
1 parent 440c1c5 commit 522ac09
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Changelog
2.1.7 (unreleased)
------------------

- Nothing changed yet.
- Add missing upgrde steps for rolemap
Fix permission checking creating a booking
[lucabel]


2.1.6 (2023-11-13)
Expand Down
2 changes: 1 addition & 1 deletion src/redturtle/prenotazioni/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>1806</version>
<version>1807</version>
<dependencies>
<dependency>profile-plone.app.dexterity:default</dependency>
<dependency>profile-collective.z3cform.datagridfield:default</dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/redturtle/prenotazioni/restapi/services/booking/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def validate(self):

if data["booking_type"] in [VACATION_TYPE]:
if not api.user.has_permission(
"redturtle.prenotazioni.ManagePrenotazioni", obj=self.context
"redturtle.prenotazioni: Manage Prenotazioni", obj=self.context
):
msg = self.context.translate(
_(
Expand Down
11 changes: 11 additions & 0 deletions src/redturtle/prenotazioni/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,15 @@
handler=".upgrades.update_rolemap"
/>
</genericsetup:upgradeSteps>
<genericsetup:upgradeSteps
profile="redturtle.prenotazioni:default"
source="1806"
destination="1807"
>
<genericsetup:upgradeStep
title="Update rolemap"
handler=".upgrades.update_rolemap"
/>
</genericsetup:upgradeSteps>

</configure>

0 comments on commit 522ac09

Please sign in to comment.