Skip to content
Snippets Groups Projects
Verified Commit a42dd377 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: add missing field level permissions

parent eda32eca
No related branches found
No related tags found
No related merge requests found
# 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"),
],
},
),
]
......@@ -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"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment