Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make changes for the published orga mediafiles #998

Closed
1 of 3 tasks
luisa-beerboom opened this issue Aug 21, 2024 · 2 comments
Closed
1 of 3 tasks

Make changes for the published orga mediafiles #998

luisa-beerboom opened this issue Aug 21, 2024 · 2 comments

Comments

@luisa-beerboom
Copy link
Member

luisa-beerboom commented Aug 21, 2024

Related issues:
OpenSlides/openslides-client#3794
OpenSlides/openslides-backend#2563

Meta PR
OpenSlides/openslides-meta#146

As a result of this issue, the mediafile model was split in two: mediafile and meeting_mediafile.
The entirety of the changes in the meta PR require the following restrictor changes:

  • mediafile:
    • If mediafile/owner_id is the organization, the user should be able to see the mediafile, if
      • mediafile/published_to_meetings_in_organization_id is not None and he is part of any meetings admin group,
      • he can see any of the related meeting_mediafiles,
      • or he fulfils the conditions detailed in the previous version.
    • If mediafile/owner_id is a meeting, the user should be able to see the mediafile, if
      • he can see any of the related meeting_mediafiles. (Note: in this case there should be exactly one meeting_mediafile, unless the database is corrupt)
  • meeting_mediafile:
    • The user can see a meeting_mediafile if
      • he is an admin of the meeting.
      • he has projector.can_see and there exists a meeting_mediafile/projection_ids with projection/current_projector_id set.
      • he has mediafile.can_manage.
      • he has mediafile.can_see and either:
        • meeting_mediafile/is_public is true, or
        • he has groups in common with meeting_mediafile/inherited_access_group_ids.
    • Mode A: The user can see the meeting_mediafile
  • meeting:
    • New restriction mode E: The user is in any meetings admin group
@luisa-beerboom
Copy link
Member Author

luisa-beerboom commented Aug 23, 2024

Also required changes for the projection system:
The old mediafile projections have been rewired to the meeting_mediafile.
The slide code for these needs to be changed so that the type name remains as mediafile, but the content_object_id is now expected to be a meeting_mediafile. Therefore to reach the proper mediafile data, the mediafile needs to first be accessed via the meeting_mediafiles mediafile_id, before the content is calculated.

@bastianjoel
Copy link
Member

Implemented in #1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants