Skip to content

Ignore participatory spaces without models in meetings visible_for scope#9790

Merged
ahukkanen merged 2 commits intodecidim:developfrom
openpoke:fix/visible_meetings_for
Sep 12, 2022
Merged

Ignore participatory spaces without models in meetings visible_for scope#9790
ahukkanen merged 2 commits intodecidim:developfrom
openpoke:fix/visible_meetings_for

Conversation

@microstudi
Copy link
Copy Markdown
Contributor

🎩 What? Why?

We've found out that it is possible to define a participatory space not associated with a model (for instance see the (decidim-calendar)[https://github.com/alabs/decidim-module-calendar] module).

But some methods are not prepared for that, in particular the scope visible_for? for the meetings model.

This should fix this by ignoring any participatory space without models in that scope.

Please describe your pull request.

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

To test the bug, install the decidim calendar module, and try to edit a meeting as a user (not admin), it should give you a 500 error.

📷 Screenshots

N/A

♥️ Thank you!

@microstudi microstudi added the type: fix PRs that implement a fix for a bug label Sep 12, 2022
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! 👍

@ahukkanen ahukkanen merged commit f3743ca into decidim:develop Sep 12, 2022
@microstudi
Copy link
Copy Markdown
Contributor Author

May I port this to 0.26. 0.27?

@ahukkanen
Copy link
Copy Markdown
Contributor

May I port this to 0.26. 0.27?

Yes please, both. Can you please use the backporter script for this. Run ./bin/backporter --help to get started.

entantoencuanto added a commit that referenced this pull request Sep 13, 2022
* develop:
  Add missing character on code block (#9798)
  Fix hidden error messages on the registration form (#9625)
  Add documentation about configuring ActiveStorage / dynamic file uploads (#9777)
  Add documentation section about customizing cells (#9622)
  Fix hashtags not recognized at the beginning of the string (#9616)
  Fix version pages showing a HTTP 500 error when the version does not exist (#9615)
  Fix multitenant organizations stats cache (#9605)
  Prevent the account edit route through Devise (#9611)
  Fix iframe disabling producing invalid HTML (#9685)
  Fix import of images on spaces (#9779)
  Fix order of last activities (#9756)
  Fix leaking emails on admin user search controller (#9791)
  Ignore participatory spaces without models in meetings visible_for scope (#9790)
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
…ope (decidim#9790)

* ignore participatory spaces without models in highlighted elements

* add a test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: meetings type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants