diff --git a/i18n_demo/indico_i18n_demo/controllers.py b/i18n_demo/indico_i18n_demo/controllers.py index ba21a7c6..f7c5ffa6 100644 --- a/i18n_demo/indico_i18n_demo/controllers.py +++ b/i18n_demo/indico_i18n_demo/controllers.py @@ -13,12 +13,12 @@ from indico.modules.categories.models.categories import Category from indico.modules.categories.operations import create_category as _create_category from indico.modules.events.cloning import get_event_cloners -from indico.modules.events.controllers.base import RHEventBase +from indico.modules.events.controllers.base import RHProtectedEventBase from indico.modules.events.operations import clone_event from indico.web.flask.util import url_for -class RHCloneEvent(RHEventBase): +class RHCloneEvent(RHProtectedEventBase): """Clone an event to a user's personal category. If the category does not exist, it will be created. @@ -30,9 +30,6 @@ def _process(self): if not (category_id := current_plugin.settings.get('test_category_id')): raise BadRequest('No test category ID configured') - if not session.user: - raise Forbidden('You must be logged in to clone events') - test_category = Category.get(int(category_id)) user_category = get_user_category(test_category, session.user)