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

Defined and used permissions #11

Merged
merged 3 commits into from
Dec 8, 2014
Merged

Defined and used permissions #11

merged 3 commits into from
Dec 8, 2014

Conversation

mathieumg
Copy link
Member

Addresses my-koop/service.website#346 for this module. Really did my best to be thorough and test different combinations of permissions, but I obviously couldn't test all of them.

@mathieumg mathieumg added this to the 1.0 milestone Dec 7, 2014
@@ -60,7 +77,14 @@ export function attachControllers(

// Get all mailing lists
binder.attach(
{endPoint: endpoints.mailinglist.list},
{
endPoint: endpoints.mailinglist.list,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is used to list all available mailing list, therefore a user with no permission wouldn't be able to see the mailing list available for himself.

Copy link
Contributor

Choose a reason for hiding this comment

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

we probably need 2 different endpoints to solve that actually. I would just comment this with a fixme with a link to an issue to solve that problem

Copy link
Member Author

Choose a reason for hiding this comment

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

Then, what is this one for? https://github.com/my-koop/module.mailing-list/blob/final/lib/controllers/index.ts#L67

Unless "in the registration page" doesn't imply "public", which I thought it did.

Copy link
Contributor

Choose a reason for hiding this comment

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

actually it the opposite, public doesn't imply "in the registration page", that route is use to get only mailing in the new user registration page, therefore there has to be another route for GetAvailableMailingList to the requesting user

Copy link
Member Author

Choose a reason for hiding this comment

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

I just meant that I thought they were one and the same. If they're not, then there do is a problem with the way you currently retrieve mailing lists for the "my account" panel.

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed, they are not the same, and we have a problem :P

@Cellule
Copy link
Contributor

Cellule commented Dec 7, 2014

CR Done

@Cellule Cellule assigned mathieumg and unassigned Cellule Dec 7, 2014
@mathieumg mathieumg assigned Cellule and unassigned mathieumg Dec 8, 2014
@Cellule
Copy link
Contributor

Cellule commented Dec 8, 2014

Didn't we agreed to remove the permission on this route for now ?

@Cellule Cellule assigned mathieumg and unassigned Cellule Dec 8, 2014
@mathieumg
Copy link
Member Author

Please place your comment in the code next to where it's relevant, because I have no clue what route you are talking about... I removed the permissions for the only one that was mentioned in the review: 46e6be7

@mathieumg mathieumg assigned Cellule and unassigned mathieumg Dec 8, 2014
@Cellule
Copy link
Contributor

Cellule commented Dec 8, 2014

46e6be7#diff-47ac35e58ff445a62be39a4cbf24b360R157

how is this a removal ? you put a fixme

@Cellule Cellule assigned mathieumg and unassigned Cellule Dec 8, 2014
@mathieumg
Copy link
Member Author

That is a route that exposes data that the user shouldn't have access to (all mailing lists), doesn't it deserve a fixme? (We discussed we would make two controllers later on)

@mathieumg mathieumg assigned Cellule and unassigned mathieumg Dec 8, 2014
@Cellule
Copy link
Contributor

Cellule commented Dec 8, 2014

Yes but we also said that this shouldn't have a permission attached to it until said second route existed. Also this is a public route at this point because mailing don't have permissions attached to them. Therefore there should be no permissions on that route

@Cellule Cellule assigned mathieumg and unassigned Cellule Dec 8, 2014
@mathieumg
Copy link
Member Author

But there is none... I commented it. I'll admit I have absolutely no clue what else you want me to do here...

@mathieumg mathieumg assigned Cellule and unassigned mathieumg Dec 8, 2014
@Cellule
Copy link
Contributor

Cellule commented Dec 8, 2014

... hurray for no code coloring on github. that /* is so easy to miss. Sorry about that.
Good to merge

@mathieumg
Copy link
Member Author

😓

Please look at diffs more carefully when explicitly linked to. 😛

mathieumg added a commit that referenced this pull request Dec 8, 2014
@mathieumg mathieumg merged commit 2624b29 into final Dec 8, 2014
@mathieumg mathieumg deleted the mg_contrib_perms branch December 8, 2014 02:36
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.

2 participants