Skip to content

Commit

Permalink
merge main into feature/relational-db
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf Peschke committed Sep 16, 2024
2 parents 8f03d2c + fc9583f commit 452a40b
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}

- name: Create or update PR
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
path: service-repository
token: ${{ steps.generate-token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pick-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}

- name: Create or update PR
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
branch: apply/commit-${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}

- name: Create or update PR
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: ${{ github.event.commits[0].message }}
Expand Down
6 changes: 3 additions & 3 deletions dev/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ autoflake==2.3.1
black==24.8.0
flake8==7.1.1
isort==5.13.2
mypy==1.11.1
pytest==8.3.2
mypy==1.11.2
pytest==8.3.3
pyupgrade==3.17.0
pyyaml==6.0.2
simplejson==3.19.2
simplejson==3.19.3
debugpy==1.8.0
requests==2.31.0
psycopg[binary]==3.1.18
Expand Down
177 changes: 105 additions & 72 deletions models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ organization:
to: mediafile/owner_id
on_delete: CASCADE
restriction_mode: A
published_mediafile_ids:
type: relation-list
to: mediafile/published_to_meetings_in_organization_id
restriction_mode: E
user_ids:
type: relation-list
restriction_mode: C
Expand Down Expand Up @@ -1351,6 +1355,10 @@ meeting:
type: string
default: pseudoanonymous
restriction_mode: B
motion_poll_default_method:
type: string
default: YNA
restriction_mode: B
motion_poll_default_onehundred_percent_base:
type: string
enum: *onehundred_percent_bases
Expand Down Expand Up @@ -1621,6 +1629,11 @@ meeting:
to: group/meeting_id
on_delete: CASCADE
restriction_mode: B
meeting_mediafile_ids:
type: relation-list
to: meeting_mediafile/meeting_id
on_delete: CASCADE
restriction_mode: B
mediafile_ids:
type: relation-list
to: mediafile/owner_id
Expand Down Expand Up @@ -1740,83 +1753,83 @@ meeting:
# Logos and Fonts
logo_projector_main_id:
type: relation
to: mediafile/used_as_logo_projector_main_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_projector_main_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_projector_header_id:
type: relation
to: mediafile/used_as_logo_projector_header_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_projector_header_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_web_header_id:
type: relation
to: mediafile/used_as_logo_web_header_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_web_header_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_pdf_header_l_id:
type: relation
to: mediafile/used_as_logo_pdf_header_l_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_pdf_header_l_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_pdf_header_r_id:
type: relation
to: mediafile/used_as_logo_pdf_header_r_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_pdf_header_r_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_pdf_footer_l_id:
type: relation
to: mediafile/used_as_logo_pdf_footer_l_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_pdf_footer_l_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_pdf_footer_r_id:
type: relation
to: mediafile/used_as_logo_pdf_footer_r_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_pdf_footer_r_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
logo_pdf_ballot_paper_id:
type: relation
to: mediafile/used_as_logo_pdf_ballot_paper_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_logo_pdf_ballot_paper_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_regular_id:
type: relation
to: mediafile/used_as_font_regular_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_regular_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_italic_id:
type: relation
to: mediafile/used_as_font_italic_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_italic_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_bold_id:
type: relation
to: mediafile/used_as_font_bold_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_bold_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_bold_italic_id:
type: relation
to: mediafile/used_as_font_bold_italic_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_bold_italic_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_monospace_id:
type: relation
to: mediafile/used_as_font_monospace_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_monospace_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_chyron_speaker_name_id:
type: relation
to: mediafile/used_as_font_chyron_speaker_name_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_chyron_speaker_name_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_projector_h1_id:
type: relation
to: mediafile/used_as_font_projector_h1_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_projector_h1_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
font_projector_h2_id:
type: relation
to: mediafile/used_as_font_projector_h2_in_meeting_id
reference: mediafile
to: meeting_mediafile/used_as_font_projector_h2_in_meeting_id
reference: meeting_mediafile
restriction_mode: B
# Other relations
committee_id:
Expand Down Expand Up @@ -2031,6 +2044,7 @@ group:
- motion.can_manage_polls
- motion.can_see
- motion.can_see_internal
- motion.can_see_origin
- motion.can_support
- poll.can_manage
- projector.can_manage
Expand Down Expand Up @@ -2066,14 +2080,14 @@ group:
to: meeting/anonymous_group_id
on_delete: PROTECT
restriction_mode: A
mediafile_access_group_ids:
meeting_mediafile_access_group_ids:
type: relation-list
to: mediafile/access_group_ids
to: meeting_mediafile/access_group_ids
equal_fields: meeting_id
restriction_mode: A
mediafile_inherited_access_group_ids:
meeting_mediafile_inherited_access_group_ids:
type: relation-list
to: mediafile/inherited_access_group_ids
to: meeting_mediafile/inherited_access_group_ids
description: Calculated field.
read_only: true
restriction_mode: A
Expand Down Expand Up @@ -2326,7 +2340,7 @@ list_of_speakers:
- motion_block
- assignment
- topic
- mediafile
- meeting_mediafile
field: list_of_speakers_id
required: true
equal_fields: meeting_id
Expand Down Expand Up @@ -2531,9 +2545,9 @@ topic:
restriction_mode: A
constant: true

attachment_ids:
attachment_meeting_mediafile_ids:
type: relation-list
to: mediafile/attachment_ids
to: meeting_mediafile/attachment_ids
equal_fields: meeting_id
restriction_mode: A
agenda_item_id:
Expand Down Expand Up @@ -2821,9 +2835,9 @@ motion:
to: tag/tagged_ids
equal_fields: meeting_id
restriction_mode: C
attachment_ids:
attachment_meeting_mediafile_ids:
type: relation-list
to: mediafile/attachment_ids
to: meeting_mediafile/attachment_ids
equal_fields: meeting_id
restriction_mode: C
projection_ids:
Expand Down Expand Up @@ -3764,9 +3778,9 @@ assignment:
to: tag/tagged_ids
equal_fields: meeting_id
restriction_mode: A
attachment_ids:
attachment_meeting_mediafile_ids:
type: relation-list
to: mediafile/attachment_ids
to: meeting_mediafile/attachment_ids
equal_fields: meeting_id
restriction_mode: A
projection_ids:
Expand Down Expand Up @@ -3905,24 +3919,12 @@ mediafile:
create_timestamp:
type: timestamp
restriction_mode: A
is_public:
type: boolean
description: "Calculated field. inherited_access_group_ids == [] can have two causes: cancelling access groups (=> is_public := false) or no access groups at all (=> is_public := true)"
read_only: true
required: true
restriction_mode: A
token:
type: string
restriction_mode: A
inherited_access_group_ids:
type: relation-list
to: group/mediafile_inherited_access_group_ids
description: Calculated field.
read_only: true
restriction_mode: A
access_group_ids:
type: relation-list
to: group/mediafile_access_group_ids
published_to_meetings_in_organization_id:
type: relation
to: organization/published_mediafile_ids
restriction_mode: A
parent_id:
type: relation
Expand All @@ -3935,6 +3937,49 @@ mediafile:
to: mediafile/parent_id
equal_fields: owner_id
restriction_mode: A
owner_id:
type: generic-relation
to:
- meeting/mediafile_ids
- organization/mediafile_ids
restriction_mode: A
required: true
constant: true
meeting_mediafile_ids:
type: relation-list
to: meeting_mediafile/mediafile_id
on_delete: CASCADE
restriction_mode: A

meeting_mediafile:
id:
type: number
restriction_mode: A
constant: true
mediafile_id:
type: relation
to: mediafile/meeting_mediafile_ids
required: true
restriction_mode: A
meeting_id:
type: relation
to: meeting/meeting_mediafile_ids
required: true
restriction_mode: A
is_public:
type: boolean
description: "Calculated in actions. Used to discern whether the (meeting-)mediafile can be seen by everyone, because, in the case of inherited_access_group_ids == [], it would otherwise not be clear. inherited_access_group_ids == [] can have two causes: cancelling access groups (=> is_public := false) or no access groups at all (=> is_public := true)"
required: true
restriction_mode: A
inherited_access_group_ids:
type: relation-list
to: group/meeting_mediafile_inherited_access_group_ids
description: Calculated in actions. Shows what access group permissions are actually relevant. Calculated as the intersection of this meeting_mediafiles access_group_ids and the related mediafiles potential parent mediafiles inherited_access_group_ids. If the parent has no meeting_mediafile for this meeting, its inherited access group is assumed to be the meetings admin group. If there is no parent, the inherited_access_group_ids is equal to the access_group_ids. If the access_group_ids are empty, the interpretations is that every group has access rights, therefore the parent inherited_access_group_ids are used as-is.
restriction_mode: A
access_group_ids:
type: relation-list
to: group/meeting_mediafile_access_group_ids
restriction_mode: A
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
Expand All @@ -3952,19 +3997,8 @@ mediafile:
- motion
- topic
- assignment
field: attachment_ids
field: attachment_meeting_mediafile_ids
restriction_mode: A
owner_id:
type: generic-relation
reference:
- meeting
- organization
to:
- meeting/mediafile_ids
- organization/mediafile_ids
restriction_mode: A
required: true
constant: true

# Reverse relations for meetings, if a mediafile is used as a special resource
used_as_logo_projector_main_in_meeting_id:
Expand Down Expand Up @@ -4292,7 +4326,7 @@ projection:
to:
- meeting/projection_ids
- motion/projection_ids
- mediafile/projection_ids
- meeting_mediafile/projection_ids
- list_of_speakers/projection_ids
- motion_block/projection_ids
- assignment/projection_ids
Expand Down Expand Up @@ -4438,7 +4472,6 @@ chat_message:
reference: meeting_user
to: meeting_user/chat_message_ids
restriction_mode: A
required: true
constant: true
chat_group_id:
type: relation
Expand Down
2 changes: 2 additions & 0 deletions permission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ motion:
can_see:
can_support:
can_see:
can_see_origin:
can_see:
poll:
can_manage:
projector:
Expand Down

0 comments on commit 452a40b

Please sign in to comment.