summaryrefslogtreecommitdiff
path: root/addons/event/controllers
diff options
context:
space:
mode:
authorAlex Tuyls <alt@odoo.com>2019-09-17 13:31:43 +0000
committerNicolas Martinelli <nim@odoo.com>2019-09-17 13:33:08 +0000
commit0d7ef88299678413d6ecc65ced4880c96d05f3dd (patch)
tree6c859cb3f8c7eebb6473d5e0352d0d9d94cff5be /addons/event/controllers
parentd3d21d2a64c4460c58022451baeba0f7e8cb9d8a (diff)
[FIX] event: allow ics file with public user
If you register online on a free event, there is an access rights error when trying to download the ICS file if you are connectd with public user. `if not event` part is pointless, if event cannot be resolved, @http.route would return a 404 anyway. `if not event.registration_ids` does not make sense from a functional point of view: there is no problem in generating an .ics file for a public event that has no registrations (yet) and the button we use to generate the .ics file is displayed after the registration anyway. opw-2066847 closes odoo/odoo#37012 X-origin-commit: f4ca5897df9295b684bcbfcafd98fbde2f8bf673 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/event/controllers')
-rw-r--r--addons/event/controllers/main.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/event/controllers/main.py b/addons/event/controllers/main.py
index f844e6a5d51..723d30aaa51 100644
--- a/addons/event/controllers/main.py
+++ b/addons/event/controllers/main.py
@@ -10,8 +10,6 @@ class EventController(Controller):
@route(['''/event/<model("event.event", "[('state', 'in', ('confirm', 'done'))]"):event>/ics'''], type='http', auth="public")
def event_ics_file(self, event, **kwargs):
- if not event or not event.registration_ids:
- return request.not_found()
files = event._get_ics_file()
if not event.id in files:
return NotFound()