-
Notifications
You must be signed in to change notification settings - Fork 43
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
Users in other sites but not main site will not have any roles #22
Comments
I think it is not possible to determine which blog_id we should use simply in the abstraction layer of this bundle. The blog_id would be passed from higher abstraction layer. i.e. The user would determine when to use the settings from site 1 ( To make I am thinking about creating multiple security contexts. However, to make our bundle works in any number of sites, we would need to somehow create a Security Context Factory, and this entails a Firewall Factory. Can Symfony do that? hm... A mere constant explodes into much more difficult solution, ouch... Let's see if there are easier way first. As a side note, we could use Firewall request matchers if we need to decide which firewall to use by host. |
A quick, dirty and inherently stupid way would be add a new method |
Looking into |
Also, what about the "site_admins" key in "wp_sitemeta"? But I think that involves adding support to read that table into entities, then decoding that key into an array and searching for the user in that array. I'm not sure the best place to put it in. I suppose it would have to happen around when the user is loaded from the provider? |
@mattsnowboard Actually you can use Security Voter in Symfony to check user role. Somthing similar to this: https://gist.github.com/kayue/f563394b7ee35a326aad |
In multisite Wordpress installations, if users are registered in other sites but not the main site, they will not have any roles when loaded by this bundle.
It is because the meta key is hardcoded in https://github.com/kayue/KayueWordpressBundle/blob/master/Model/User.php#L324
The text was updated successfully, but these errors were encountered: