Skip to content

Allow assembly admins to manage components in child assemblies#8955

Merged
ahukkanen merged 2 commits intodecidim:developfrom
CodiTramuntana:allow_actions_child_assembly_admins
Apr 1, 2022
Merged

Allow assembly admins to manage components in child assemblies#8955
ahukkanen merged 2 commits intodecidim:developfrom
CodiTramuntana:allow_actions_child_assembly_admins

Conversation

@laurajaime
Copy link
Copy Markdown
Contributor

@laurajaime laurajaime commented Mar 2, 2022

🎩 What? Why?

Assembly admins can perform actions on child assemblies like create, edit, update, copy, export... but it is not possible to manage components, members, moderations, etc.

Captura de pantalla de 2022-03-02 12-19-40

In #8773, we did an approach, but I forgot to allow assembly admins to do those actions.

Also, in development, I found an error when trying to access a component created in child assemblies:

Captura de pantalla de 2022-03-02 13-46-41

This bug is also fixed in PR, this was happened because child assemblies don't have Decidim::AssemblyUserRole.

📌 Related Issues

Testing

  1. Sign in with an assembly admin
  2. Go to a child assembly and check you can update, copy, export... succesfully.
  3. Go to components, create component and check you can publish, edit... successfully.

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

♥️ Thank you!

@laurajaime laurajaime marked this pull request as draft March 3, 2022 07:06
@laurajaime laurajaime force-pushed the allow_actions_child_assembly_admins branch from 4153745 to 9054a6c Compare March 4, 2022 11:14
@laurajaime laurajaime marked this pull request as ready for review March 7, 2022 10:38
tramuntanal
tramuntanal previously approved these changes Mar 7, 2022
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

I've tested it locally and it works

@tramuntanal
Copy link
Copy Markdown
Contributor

@LauraJaimeC I would change the title to "Allow assembly admins to manage components in child assemblies"

@laurajaime laurajaime changed the title Allow assembly admins manage all related with children assemblies Allow assembly admins to manage components in child assemblies Mar 8, 2022
@andreslucena andreslucena added module: assemblies type: fix PRs that implement a fix for a bug labels Mar 9, 2022
@andreslucena
Copy link
Copy Markdown
Member

but it is not possible to manage components, members, moderations, etc.

Talking about happy path, I didn't thought about creating these things 😅

@laurajaime
Copy link
Copy Markdown
Contributor Author

@andreslucena hello, can you run the proposals test again? Thanks!

@andreslucena
Copy link
Copy Markdown
Member

@LauraJaimeC I think that's a flaky that we had in develop, it should be fixed already. Can you merge with develop please? Thanks

@laurajaime
Copy link
Copy Markdown
Contributor Author

I think that's a flaky that we had in develop, it should be fixed already. Can you merge with develop please? Thanks

I've done rebase with develop.

@laurajaime
Copy link
Copy Markdown
Contributor Author

@andreslucena tests are passing, ready to review!

@tramuntanal
Copy link
Copy Markdown
Contributor

Hi @andreslucena , friendly reminder, this PR is ready

@andreslucena andreslucena requested a review from ahukkanen March 28, 2022 11:32
@laurajaime
Copy link
Copy Markdown
Contributor Author

Hi @ahukkanen, the PR is ready to review ✨

If you have any questions, feel free to ask me :)

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.

👍

Tested locally that these work as a parent assembly admin:

  • Can access child assembly admin
  • Can access components admin on child assembly
  • Can update component on child assembly
  • Can access moderations on child assembly
  • Can access and update members on child assembly

So to me it seems to work correctly.

@ahukkanen ahukkanen merged commit 0b36942 into decidim:develop Apr 1, 2022
@tramuntanal tramuntanal deleted the allow_actions_child_assembly_admins branch April 4, 2022 08:27
entantoencuanto added a commit to PopulateTools/decidim that referenced this pull request Apr 5, 2022
* chore/meetings_optimization:
  Add touch:true to Follow association with followable
  Fragment cache meetings partial in meetings index
  Bump minimist and node-forge (decidim#9131)
  Bump puma from 5.6.2 to 5.6.4 (decidim#9132)
  Add base URI to meta image URLs (decidim#9125)
  Make Decidim fully configurable via ENV vars part II (decidim#8990)
  Allow assembly admins to manage components in child assemblies (decidim#8955)
  Export calendar improvements (decidim#9035)
  Add reminders for publishing reports to meeting authors (decidim#8757)
  VAPID key generator availabe in core (decidim#9107)
  Dont add external link container inside editor (decidim#9095)
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants