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

Do not use meeting/user_ids anymore #2107

Open
ostcar opened this issue Mar 18, 2023 · 6 comments
Open

Do not use meeting/user_ids anymore #2107

ostcar opened this issue Mar 18, 2023 · 6 comments

Comments

@ostcar
Copy link
Member

ostcar commented Mar 18, 2023

We have the definition, that a user is in a meeting, if he is in a group of a meeting: https://github.com/OpenSlides/OpenSlides/wiki/Users#user-association-to-meetings

Currently we have the field meeting/user_ids. It contains all user ids, that at least in one group of the meeting.

This field has a problem. It is not of type relation-list. So it is not restricted. This means, if a requestuser can see only some users of the meeting, he still gets all user-ids of this meeting. You can test this, when you have a requestuser that has not the permission user.can_see and visit the meeting list or the commitee detail view.

The solution is easy. Do not use this field but calculate it. To calculate it, you have to fetch meeting/group_ids/user_ids:

{
    "collection": "meeting",
    "ids": [
        1
    ],
    "fields": {
        "group_ids": {
            "type": "relation-list",
            "collection": "group",
            "fields": {
                "user_ids": null
            }
        }
    }
}

Then the user_ids of all fields have to be merged.

When you do it like this, the restricter removes the user_ids, that the request-user is not allowed to see.

After this is done in the client (and other services), the field can be removed in the backend.

@ostcar ostcar added the enhancement General enhancement which is neither bug nor feature label Mar 18, 2023
@ostcar ostcar added this to the 4.1 milestone Mar 18, 2023
@ostcar ostcar added bug and removed enhancement General enhancement which is neither bug nor feature labels Mar 18, 2023
@ostcar
Copy link
Member Author

ostcar commented Mar 18, 2023

@emanuelschuetze also asks (he is sitting next to me), that the participant number in the meeting list view and committee detail view should be removed, when the request-user does not have the permission user.can_see.

@bastianjoel
Copy link
Member

I will include this in #2097

@rrenkert
Copy link
Member

@bastianjoel Can we close here?

@bastianjoel
Copy link
Member

No

@rrenkert
Copy link
Member

A small hint why the answer is "no" would be nice. Is this not included in the already merged #2097?

@bastianjoel
Copy link
Member

No it is not included. I had some concerns about this and thought it might be better to test this separately.

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

4 participants