bundles/pretalx: add script to automatically set is_administrator and is_staff based on group membership
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-10-15 20:03:15 +02:00
parent f02088d9fe
commit 86953e60bd
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 90 additions and 0 deletions

View file

@ -129,6 +129,9 @@ files = {
'svc_systemd:pretalx-worker:restart',
},
},
'/opt/pretalx/pretalx-administrators-from-group': {
'mode': '0755',
},
'/etc/systemd/system/pretalx-runperiodic.timer': {
'triggers': {
'action:systemd-reload',
@ -165,6 +168,16 @@ files = {
},
}
if node.metadata.get('pretalx/administrators-from-group-id', None):
files['/etc/cron.d/pretalx-administrators-from-group'] = {
'source': 'cron-pretalx-administrators-from-group',
'content_type': 'mako',
}
else:
files['/etc/cron.d/pretalx-administrators-from-group'] = {
'delete': True,
}
# run `pip install` one after another due to concurrency issues
last_action = 'action:pretalx_install'
for plugin_name, plugin_config in node.metadata.get('pretalx/plugins', {}).items():