diff --git a/program/migrations/0105_alter_host_options_alter_note_options_and_more.py b/program/migrations/0105_alter_host_options_alter_note_options_and_more.py new file mode 100644 index 0000000000000000000000000000000000000000..286375162cdc2d492935ae9dd313594518af2f44 --- /dev/null +++ b/program/migrations/0105_alter_host_options_alter_note_options_and_more.py @@ -0,0 +1,60 @@ +# Generated by Django 4.2.13 on 2024-07-01 23:31 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("program", "0104_radiosettings_station_logo_height_and_more"), + ] + + operations = [ + migrations.AlterModelOptions( + name="host", + options={ + "ordering": ("name",), + "permissions": [ + ("edit__host__biography", "Can edit biography field"), + ("edit__host__email", "Can edit email field"), + ("edit__host__image", "Can edit image field"), + ("edit__host__links", "Can edit links field"), + ("edit__host__name", "Can edit name field"), + ("edit__host__owners", "Can edit owners field"), + ("update_host", "Can update host"), + ], + }, + ), + migrations.AlterModelOptions( + name="note", + options={ + "ordering": ("timeslot",), + "permissions": [ + ("edit__note__cba_id", "Can edit CBA id field"), + ("edit__note__content", "Can edit content field"), + ("edit__note__contributors", "Can edit contributor field"), + ("edit__note__image", "Can edit image field"), + ("edit__note__languages", "Can edit language field"), + ("edit__note__links", "Can edit links field"), + ("edit__note__playlist", "Can edit playlist field"), + ("edit__note__summary", "Can edit summary field"), + ("edit__note__tags", "Can edit tags field"), + ("edit__note__title", "Can edit title field"), + ("edit__note__topics", "Can edit topics field"), + ("create_note", "Can create note"), + ("update_note", "Can update note"), + ], + }, + ), + migrations.AlterModelOptions( + name="timeslot", + options={ + "ordering": ("start", "end"), + "permissions": [ + ("edit__timeslot__memo", "Can edit memo field"), + ("edit__timeslot__playlist", "Can edit playlist field"), + ("edit__timeslot__repetition_of", "Can edit repetition of field"), + ], + }, + ), + ] diff --git a/program/models.py b/program/models.py index 11c37e700649c0edf1aaf9b75f46f8d29c6cab1c..448874217c02017bc872980f49f45061dca2875a 100644 --- a/program/models.py +++ b/program/models.py @@ -184,6 +184,7 @@ class Host(models.Model): ("edit__host__biography", "Can edit biography field"), ("edit__host__email", "Can edit email field"), ("edit__host__image", "Can edit image field"), + ("edit__host__links", "Can edit links field"), ("edit__host__name", "Can edit name field"), ("edit__host__owners", "Can edit owners field"), # overrides ownership @@ -446,7 +447,11 @@ class TimeSlot(models.Model): class Meta: ordering = ("start", "end") - permissions = [("edit__timeslot__playlist", "Can edit playlist field")] + permissions = [ + ("edit__timeslot__memo", "Can edit memo field"), + ("edit__timeslot__playlist", "Can edit playlist field"), + ("edit__timeslot__repetition_of", "Can edit repetition of field"), + ] def __str__(self): if self.start.date() == self.end.date(): @@ -498,11 +503,13 @@ class Note(models.Model): class Meta: ordering = ("timeslot",) permissions = [ + ("edit__note__cba_id", "Can edit CBA id field"), ("edit__note__content", "Can edit content field"), ("edit__note__contributors", "Can edit contributor field"), ("edit__note__image", "Can edit image field"), ("edit__note__languages", "Can edit language field"), ("edit__note__links", "Can edit links field"), + ("edit__note__playlist", "Can edit playlist field"), ("edit__note__summary", "Can edit summary field"), ("edit__note__tags", "Can edit tags field"), ("edit__note__title", "Can edit title field"),