def delete(self, id): if not self.authz.am_authorized(c, Action.PURGE, System()): abort(401, _('Unauthorized to delete idea')) delete_idea(id) return h.redirect_to(h.url_for('ideas'))