OpenSlides / openslides-backend

Backend service for OpenSlides 4+
MIT License
6 stars 26 forks source link

Motion create with specific group permissions not possible #2723

Open MSoeb opened 3 weeks ago

MSoeb commented 3 weeks ago

Describe the bug If a participant has the group permissions 'can see agenda, 'Can see internal items and time scheduling of agenda, 'Can manage agenda', 'can see motions', 'Can create motions' and 'Can manage motion metadata' motion creation is not possible. By saving it an error appears.

Error message: Fehler: You are not allowed to perform action motion.create. Forbidden fields: agenda_type, agenda_create

How to Reproduce Steps to reproduce the behavior:

  1. open a meeting
  2. open participants > groups > grant the delegate group the above mentioned permissions
  3. open participants > create a user as delegate
  4. login as the user > open motions > create a new motion > enter title and text > try to save

Expected behavior The motion creation with the specific set of permissions should work.

Please check, if agenda_type, agenda_create would have other negative impacts on creating motions.

It could be possible, that there is a relation to the issue OpenSlides/openslides-client#4290

reiterl commented 6 days ago

The user should be allowed to create agenda item, if he has the permission for it. The backend doesn't allow it. As far as I can see, the backend action is now missing the agenda item permission check and a test for it. -> To backend.

luisa-beerboom commented 2 days ago

If the agenda properties are set it breaks, if they aren't set it works. I assume you got this error while trying to create a motion that was supposed to go straight into the agenda. If not, we may have to look into why the client is uselessly sending agenda properties.

Regardless the fact that these fields just do not work, this requires a fix in the backend. On that note: I would need to know what permissions one should have to be able to add motions to the agenda in this sense. I also would need to know what effect the setting agenda_item_creation would have on this. I looked through the docs, but have not yet found anything.

Elblinator commented 2 days ago

The Client is sending these field even if they are empty, I'll create it's own Issue for the wrong behaviour of the client and link it with this Issue.

This Error also appears when the motion was supposed to go straight into the agenda. A person should be allowed to add a motion straight into the agenda if they are allowed to manage the agenda

Elblinator commented 2 days ago

The client wanted behaviour is documented here: https://github.com/OpenSlides/openslides-client/issues/4359