-
Notifications
You must be signed in to change notification settings - Fork 12
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
role mapping on multi-site #56
Comments
This plugin currently uses EDIT: You will also need to modify the relevant If you give it a try, please let us know how it goes! If it works, we'll want to look at making this plugin aware of whether it was activated at the network or site level. Note to self - consider extend static $network_active;
if ( $network_active === null ) {
$plugin_file = plugin_basename( __FILE__ );
$network_active = is_plugin_active_for_network( $plugin_file );
}
if ( $network_active ) {
$option = get_site_option( $option );
} else {
$option = get_option( $option );
} Also would need to create wrappers for |
I see. Thank you for clarifying. I'd like to continue the conversation by describing my use-case and legacy solution a little more as it is really valuable to us. Our network has around 900 sites. We are using authentication with shibboleth plugin 1.6 and Shibboleth Role Mapping Extension by Erick Hitter, version 1.0 (which is no longer available) The combination of the two allows us to strictly use shib-auth, thereby preventing local account issues and we can add groups to sites, which is really useful when, for instance we want an academic class to have all students as authors and all TAs as editors. |
Okay, so you're saying that Shibboleth is network activated, but you want to be able to specify additional role mappings per-site? Would you get multiple roles or just the first one? (a conversation about managed role started recently #55) Reminder for implementer: If we go this route, we'll need to look at how this affects multisite and loading pages for sites after we've already logged in to make sure roles don't stay out of sync. |
That is correct, Shibboleth is network activated. Thank you for inferring that! Perhaps your question is about a person who has membership in two groups, one with a role of Subscriber and one with a role of Administrator. In that instance, we would grant the most privileged role to the user. |
Correct, I was asking about the expected way that the plugin would handle when the user would map to two or more roles based on being a member of multiple groups. The question is simpler if we only consider the default, unmodified roles in WordPress. However, roles can be more about separating permissions than describing a strictly vertical hierarchy, so in several cases we've implemented additive roles as a good way to leverage both a separation of concerns and the principle of least privilege. Thus, because we've already implemented support for user generated roles, it seems to make sense to assign a user all of the roles that they qualify for and not attempt to limit to the "first matching" or "most priviliged". In short: Would it still meet your needs if it mapped individuals to all of the roles for which they qualify? |
Thank you for clarifying. Yes, that would make sense. |
Perhaps role mapping should be provided by a separate plugin, as it is in our legacy setup. That would allow your plugin to continue working with its current use-case and it would allow this additional functionality for those who need it. |
A separate plugin can already do this, but only if they want to set one role because of the use of What we should probably do (in addition to the multi-role support) is look to separating the built-in logic within |
Hi all, |
I second your enthusiasm but have not heard from the dev team that they have decided to incorporate this use case in their plugin. |
I'm open to someone creating a PR for this use case, but I don't have the resources to implement it at this time. |
Wow! I have student workers who help with WP support and development. Could we create a pull request to add this functionality? That might be a great project for them to learn more on. |
I am supporting a legacy site that was using a combination of plugins to provide shib-auth and role mappings. One of the nice features of our setup is that each site in the network has a screen which allows you to map roles for that site. So, if I were in a site, I would navigate to Dashboard>Users>Shibboleth
The downside is that the plugins are orphaned by their developers and I'm having trouble finding a replacement that works with PHP 7.
I was hoping to ask if I am properly understanding this plugin. Does it offer per-site role mapping? It doesn't seem to. Are there any plugins that will add that feature to this plugin?
screenshot of site-based role mappings:
https://snag.gy/ELlnTq.jpg
The text was updated successfully, but these errors were encountered: