OpenSlides/server/openslides/agenda/migrations/0005_auto_20180815_1109.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

58 lines
1.8 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-08-15 09:09
from __future__ import unicode_literals
from django.contrib.auth.models import Permission
from django.db import migrations, models
from openslides.utils.migrations import (
add_permission_to_groups_based_on_existing_permission,
)
def delete_old_can_see_hidden_permission(apps, schema_editor):
perm = Permission.objects.filter(codename="can_see_hidden_items")
if len(perm):
perm = perm.delete()
class Migration(migrations.Migration):
dependencies = [("agenda", "0004_speaker_marked")]
operations = [
migrations.AlterModelOptions(
name="item",
options={
"default_permissions": (),
"permissions": (
("can_see", "Can see agenda"),
("can_manage", "Can manage agenda"),
("can_manage_list_of_speakers", "Can manage list of speakers"),
(
"can_see_internal_items",
"Can see internal items and time scheduling of agenda",
),
),
},
),
migrations.AlterField(
model_name="item",
name="type",
field=models.IntegerField(
choices=[(1, "Agenda item"), (2, "Internal item"), (3, "Hidden item")],
default=3,
),
),
migrations.RunPython(
add_permission_to_groups_based_on_existing_permission(
"can_see_hidden_items",
"item",
"agenda",
"can_see_internal_items",
"Can see internal items and time scheduling of agenda",
)
),
migrations.RunPython(delete_old_can_see_hidden_permission),
]