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

Regression with subsites compatibility #38

Closed
robbieaverill opened this issue Sep 3, 2018 · 4 comments
Closed

Regression with subsites compatibility #38

robbieaverill opened this issue Sep 3, 2018 · 4 comments

Comments

@robbieaverill
Copy link
Contributor

There's a test failing against the latest subsites version: https://travis-ci.org/silverstripe/cwp-recipe-kitchen-sink/jobs/423801729#L950

This would've been caused by silverstripe/silverstripe-subsites#388

Needs investigation. We should start by separating that test into individual cases to ensure it's not pollution of the global state between loading each fixture and running tests on them

@robbieaverill
Copy link
Contributor Author

I've confirmed it as a regression, not just in the tests

@robbieaverill robbieaverill self-assigned this Sep 7, 2018
@robbieaverill
Copy link
Contributor Author

I've made a mistake in my thinking with that subsites pull request. In psuedo code, this is what I've changed it to do when you're asking which subsites can be accessed for a given permission code:

  • Loop all subsites
  • Set current subsite to each
  • Ask Permission::checkMember whether the code is valid in the current state

I think the problem is that the permission check doesn't cross reference against the subsites a user's group can be used in, so they're all treated as global checks.

In practice the permission system seems to be working, but the API has clearly regressed since this report is broken.

I'll need to reintroduce some of the previous logic to run SQL queries against the member's groups in order to filter permissions available for each group the member is in, which is in turn filtered against the current subsite.

The Permission::checkMember() method won't work I don't think =(

@robbieaverill
Copy link
Contributor Author

I've brain dumped at silverstripe/silverstripe-subsites#358 (comment)

@robbieaverill
Copy link
Contributor Author

We've reverted the subsites change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant