support 3rd party plugins registering as group providers#5
support 3rd party plugins registering as group providers#5andrepl wants to merge 1 commit intoElgarL:masterfrom
Conversation
|
Not sure how useful this would be. Sure it would make Lockette checks simple, but not sure how many perms/groups plugins would implement it. Especially seeing as though we should hook them to gain information, not the other way around. |
|
It's up to you, but I think both ways are equally useful. IMO a plugin should include support for whatever 3rd party plugins the developer considers reasonable, and allow for others to hook themselves where possible. This is where plugincore is missing something, its got fine support for a bunch of existing plugins and a even a nice set of interfaces for the services they can provide, but then no way for a 3rd party to register one. I don't think there is an Ideal solution short of using some sort of "ServiceProvider" architecture, which seems way out of scope for something like Lockette, but I also don't see any downside to making the hook available, since if no plugins register with it there is no performance or maintenance impact to speak of. Anyway, feel free to pull or close as you see fit, but this is a feature I need for a much larger plugin I'm working on and adding another large dependency to PluginCore seems like the wrong way to go for a plugin which will likely never see the light of day outside of my own server. |
This probably would have fit better into PluginCore but I couldn't find any support for registering it's Link classes externally and it seemed like significantly more work than this tiny little patch.
This commit comes a GroupProvider interface with one method to look up group membership. Plugins can implement this interface and Lockette will check with them in all the places it would normally check for group memberships.