Skip to content

Allow assembly admins administer children assemblies#8773

Merged
andreslucena merged 5 commits intodecidim:developfrom
CodiTramuntana:feat/subassemblies_process_role
Feb 21, 2022
Merged

Allow assembly admins administer children assemblies#8773
andreslucena merged 5 commits intodecidim:developfrom
CodiTramuntana:feat/subassemblies_process_role

Conversation

@laurajaime
Copy link
Copy Markdown
Contributor

@laurajaime laurajaime commented Feb 2, 2022

🎩 What? Why?

An assembly admin can now create and list the child assemblies of which they are an admin.

In this hierarchy: Grandmother Assembly > Mother Assembly > Child Assembly, if assembly admin administrates the Mother Assembly, the user can:

  • Show list with Grandmother assembly and see some data (if it's promoted, title, created at, if it's private and published) but user can't do actions like export, copy or edit.
  • Fully administer the Mother assembly
  • Fully administer the Child assembly

Testing

  1. Log in with an assembly admin and you are mother assembly admin.
  2. You can create a child assemblies in the mother assembly and you can fully administrate Mother and Child.
  3. You only can show data but don't do any action in Grandmother assembly.

📷 Screenshots

imagen
imagen
imagen

♥️ Thank you!

@laurajaime laurajaime force-pushed the feat/subassemblies_process_role branch from e12acf2 to f1393c3 Compare February 2, 2022 13:19
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.

LGTM @LauraJaimeC I just have one question regarding the tests

@andreslucena
Copy link
Copy Markdown
Member

First, thanks for this contribution. We've just talked a bit in @decidim/product meeting today, and we thought that this would be a great improvement for the current permissions in assemblies and it's relatives.

By any chance, do you have a Metadecidim proposal to know more details about this?

For what I've seen, given that there's a set of Grandmother > Mother > Child assembly, if you give an Admin user role to a participant in the Mother assembly, then...

How it works before this PR

  • The admin can only see some data of the Grandmother assembly (if it's promoted, title, created at, if it's private and published)
  • The admin can fully administer the Mother assembly
  • The admin cannot see the Child assembly, unless it's given a specific user role in it, of course

How it works after this PR

  • The admin has some new icons in the Grandmother assembly screen (like Export and Duplicate) but when clicking I see the "You are not authorized to perform this action" callout
  • The admin can fully administer the Mother assembly
  • The admin can see the Child assembly, but it has the same behavior as Grandmother (I have the Export and Duplicate buttons, but when clicking it says that I'm not authorized)

image

How I expected that this work

  • The admin can only see some data of the Grandmother assembly (if it's promoted, title, created at, if it's private and published)
  • The admin can fully administer the Mother assembly
  • The admin can fully administer the Child assembly

Copy link
Copy Markdown
Member

@andreslucena andreslucena 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 left a comment on how this should work, can you give it a look @LauraJaimeC @tramuntanal 🙏🏽 ? Thanks

@tramuntanal
Copy link
Copy Markdown
Contributor

First of all, thank you for this thorough testing @andreslucena

We'll create the proposal in meta-decidim asap and will extend this PR with the missing permissions for Export and Duplicate.

@andreslucena
Copy link
Copy Markdown
Member

There's a failing relevant spec related to assemblies permissions, can you check it @LauraJaimeC 🙏🏽 ?

@laurajaime
Copy link
Copy Markdown
Contributor Author

There's a failing relevant spec related to assemblies permissions, can you check it @LauraJaimeC 🙏🏽 ?

Hi! can you review it again? Thanks!

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Now it works as expected, awesome!! I have some suggestions to improve this.

@andreslucena
Copy link
Copy Markdown
Member

Also can you add more details with the last changes and how it should work in the PR description? Thanks

@andreslucena andreslucena changed the title Assemblies admins can create and list the child assemblies Allow assembly admins administer children assemblies Feb 18, 2022
Comment thread decidim-assemblies/spec/permissions/decidim/assemblies/permissions_spec.rb Outdated
@tramuntanal
Copy link
Copy Markdown
Contributor

@LauraJaimeC , we must backport to 0.25 also.

@laurajaime
Copy link
Copy Markdown
Contributor Author

@andreslucena
Copy link
Copy Markdown
Member

@LauraJaimeC , we must backport to 0.25 also.

We're in the process of releasing v0.26, so we don't accept backports to v0.25 already. For now, we have the v0.26.0.rc2, but we hope to have the v0.26.0 this week.

Also, as this is a new feature, we don't accept backports for this.

Of course, if you need it in v0.25 you could make a fork, backport the feature in your fork and configure your installation against that.

@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
fblupi added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Nov 7, 2023
fblupi added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Nov 15, 2023
fblupi added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Nov 21, 2023
fblupi added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants