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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass the current component to the action authorizer #3708

Conversation

leio10
Copy link
Contributor

@leio10 leio10 commented Jun 22, 2018

馃帺 What? Why?

This PR slightly modifies the authorization process, adding a reference to the component where the authorization is taking place to the DefaultActionAuthorizer that will perform the authorization process.

This reference is not used by any code, but it can be used by a custom action authorizer. In my case,
I need to check that the user's scope is included in the participatory space's scope to perform the authorization. With this PR I can find it out from the current component reference and compare it with the user's scope.

馃搶 Related Issues

馃搵 Subtasks

  • Add CHANGELOG entry
  • Add documentation regarding the feature

@ghost ghost assigned leio10 Jun 22, 2018
@ghost ghost added the status: WIP label Jun 22, 2018
@leio10 leio10 force-pushed the enhancement/add_component_to_authorization branch from 2238994 to 54a4c38 Compare June 22, 2018 15:33
@leio10 leio10 changed the title Pass current component to action authorizer Pass the current component to the action authorizer Jun 22, 2018
mrcasals
mrcasals previously approved these changes Jun 25, 2018
Copy link
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@mrcasals
Copy link
Contributor

@deivid-rodriguez do you want to review this?

Copy link
Contributor

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Looks good to me too!

@mrcasals mrcasals merged commit 8b9a573 into decidim:master Jun 26, 2018
@mrcasals
Copy link
Contributor

Wohoo! 馃挭

@leio10 leio10 deleted the enhancement/add_component_to_authorization branch June 27, 2018 07:32
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.

None yet

3 participants