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

Apply permissions system to comments #7726

Closed
1 task
andreslucena opened this issue Mar 25, 2021 · 4 comments · Fixed by #8035
Closed
1 task

Apply permissions system to comments #7726

andreslucena opened this issue Mar 25, 2021 · 4 comments · Fixed by #8035
Assignees
Labels
contract: online-meetings Barcelona City Council contract module: comments

Comments

@andreslucena
Copy link
Member

andreslucena commented Mar 25, 2021

Ref: OM23 / DECOM-27

Is your feature request related to a problem? Please describe.

As a participatory space administrator, I would like to be able to define who is allowed to leave a comment in a given component.

Describe the solution you'd like

To have a Comment action in the components permissions.

Describe alternatives you've considered

To have another way of configuring permissions, but that'd be against consistency.

Initially, we thought about configuring these permissions at the space level, but we don't have general Permissions for a given space and that could be too much of a hassle. As @verarojman said:

Note: Only works for comments linked to components, not participatory spaces (meaning that this does not apply to questions in consultations as a question is treated as a participatory space). This is because the whole system of dealing with permissions in modals and other checks requires a component (current_component) available. This should be refactored in another PR. See note in

# actions are linked to objects belonging to a component
# In consultations, a question belong to a participatory_space but it has comments
# To apply :comment permission, the modal authorizer should be refactored to allow participatory spaces-level comments

Additional context

There's a first draft iteration of this in #6916 that we could start from. Thanks @verarojman 🚀 🚀

Does this issue could impact users' private data?

No, it's about adding permissions to comments.

Acceptance criteria

  • Given that I'm a space administrator
    When I configure that only the "Organization's census" can comment in a proposal component
    Then only participants verified with the "Organization's census" can comment in this proposal
    And
    Then other participants see an error "You don't have permissions to comment"
@andreslucena andreslucena created this issue from a note in Online Meetings (Product Backlog) Mar 25, 2021
@andreslucena andreslucena added contract: online-meetings Barcelona City Council contract module: comments labels Mar 25, 2021
@entantoencuanto entantoencuanto moved this from Product Backlog to Sprint Backlog in Online Meetings May 17, 2021
@entantoencuanto entantoencuanto moved this from Sprint Backlog to Doing in Online Meetings May 20, 2021
@entantoencuanto entantoencuanto self-assigned this May 20, 2021
@furilo furilo moved this from Doing to Ready in Online Meetings May 24, 2021
@ferblape ferblape moved this from Ready to Doing in Online Meetings May 24, 2021
@entantoencuanto
Copy link
Contributor

I'm not sure what I have to do with the 2 commentable models not related with components (Decidim::Initiative and Decidim::Consultations::Question) Should I adapt the permissions system for these models also?

cc/ @decidim/product

@furilo
Copy link

furilo commented May 31, 2021

Ping @decidim/product

@carolromero
Copy link
Member

@entantoencuanto yes, they should be adapted as well. Thank you!

@furilo furilo moved this from Doing to Ready in Online Meetings Jun 8, 2021
@carolromero carolromero moved this from Ready to QA Testing in Online Meetings Jun 9, 2021
@carolromero carolromero moved this from QA Testing to Doing in Online Meetings Jun 29, 2021
@entantoencuanto entantoencuanto moved this from Doing to QA Testing in Online Meetings Jul 8, 2021
@entantoencuanto
Copy link
Contributor

Hi, @decidim/product, this issue is ready for QA testing. There is a previous bug preventing accessing to permissions on budgets projects, there is a problem with the routes generation, but for the rest of resources the issue can be reviewed.

@carolromero carolromero moved this from QA Testing to Technical Review in Online Meetings Jul 13, 2021
@ferblape ferblape moved this from Technical Review to Done in Online Meetings Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contract: online-meetings Barcelona City Council contract module: comments
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants