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

Allow users to edit proposals after imports #234

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

antopalidi
Copy link
Member

fixes #233

Screenshot 2023-08-25 at 15 10 20

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage is 88.57% of modified lines.

❗ Current head 8bb2e6a differs from pull request most recent head 5ab5ebb. Consider uploading reports for the commit 5ab5ebb to get more accurate results

Files Changed Coverage
...ecidim_awesome/admin/config_constraints_helpers.rb ø
...dim/decidim_awesome/proposals/proposal_override.rb 87.09%
...forms/decidim/decidim_awesome/admin/config_form.rb 100.00%
lib/decidim/decidim_awesome/awesome.rb 100.00%
lib/decidim/decidim_awesome/engine.rb 100.00%

📢 Thoughts on this report? Let us know!.

@antopalidi antopalidi self-assigned this Aug 25, 2023
Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

Thanks Anna,
Couple of things, you have chosen to modify the permissions class, another alternative might be to override the method def editable_by?(user) in the model Proposal. This is a suggestion, in case it is easier.
Another thing that is needed, is the ability to scope the the feature to certain components, for this we need to add tests too, this is done with the constrains like in here

context "when constraints are present" do
or
shared_examples "starts with caps" do |prop|
.

In the admin, constrains are applied with the modal editor (needs to be added):
image

lib/decidim/decidim_awesome/awesome.rb Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to edit proposals after imports
2 participants