Contribution protection

Hello. Is it possible to set protection for all contributions (pdf, pptx, links, etc.) in one go? However, I don’t want to make protection for whole event…

You should be able to iterate the contributions with indico shell and set the protection flag.
I don’t think there is a default for all new materials to be protected at the moment.

Correct, there’s no option for it in Indico.

For the indico shell option you first of all need to clarify whether you want to protect contributions or just the materials. Anyway, one of these two queries should do the job depending on what you want:

  • Contribution.query.filter_by(event_id=12345).update({Contribution.protection_mode: 2})
  • Attachment.query.filter(Attachment.folder.has(Attachmentfolder.event_id == 12345)).update({Attachment.protection_mode: 2})

Afterwards you need to db.session.commit() to save the changes.

1 Like