-
Notifications
You must be signed in to change notification settings - Fork 451
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Clarify the implementation of "Site" plugins #1923
Comments
(Throwing at 3.0.2 for no particular reason) |
Where I'm currently headed with this is a new plugin setting "enable_site_config" with a English meaning of "Use Site Settings". In the context 0 (site context), if set this means that the plugin will settings at the context-specific level will be disallowed/ignored. If unset at the site context, this checkbox can be used in the journal/press/conference context to indicate that the plugin will use the setting from the site context instead of any context-specific settings.
In this case, the LDAP plugin will only ever use site level settings. (Site config is set at the site level nothing can override it).
In this case, the LDAP plugin will use site configuration settings at the site level (implicit), and from context 3 (by site config setting), but context 1 will use its own settings. Thoughts, concerns? |
@asmecher, why is I'm tempted to migrate this function to |
@ctgraham, hmm, I don't really like that function as it's currently written -- it makes static use of the PKPRequest object, which is deprecated behavior. I would rather see |
This is where I get a little lost in the new framework. How does a GridCellProvider know its current context for a call to something like
|
This is where some refactoring might get persnickety. In my opinion we should be providing the |
Well, @asmecher, I'm committed to adding new functionality for plugins to understand their instantiated context better. I'm not going to refactor the whole controller framework, but could I start refactoring the pieces I touch (like the GridCellProvider). Do you have a preference if I start into this piecemeal vs. someone else actually approaching this from a full-picture perspective? If I left this to a comprehensive refactoring, I would continue to leverage the existing static use of |
…lumn() to include current $request object ##ulsdevteam/add-request-to-gridcellprovider##
@asmecher, can you comment on the direction of these pulls: |
Rather than adding the |
Ok. There are a ton of empty constructors:
If I refactor this, I'm inclined to delete them rather than change every one to:
Let inheritance do its job, and only override the constructor when needed, as:
Thoughts? |
…l PKPRequest object, then use this request object for other methods rather than passing it as a parameter
…n initial PKPRequest object, then use this request object for other methods rather than passing it as a parameter. ##ulsdevteam/refactor-gridcell-constructor##
@asmecher, let me know what you think of these commits: This drafts adding the Particular questions/concerns would include:
|
Bump: @asmecher |
I think breaking backwards compatibility is justified in this case, nasty as it is. An attempt to make this accept either behavior gracefully would be a cure worse than the disease. Your take on Please nuke the unnecessary constructors, thanks -- they're worse than useless! |
@ctgraham, just FYI: with OMP 3.1 out and OJS 3.1 a few months out, I'm making some related compatibility-breaking changes -- see e.g. #2336. Shall we see if we can get this bashed into shape and merged sometime in the next week? Let me know where it's at and what your time looks like, and I'll fill in the rest. |
@ctgraham, would it be maybe also possible to consider just some of the plugin settings on context-level in the similar way? -- For example, the statistics display on the article page. -- The usage statistics plugin is site-wide and it is good that most of the settings (e.g. the statistics log format) are site-wide, but it would be nice for journals to configure the display/chart on their own. |
@asmecher, I will be focused early this week on fixing #2327 and working some data cleanup that accompanies it and http://forum.pkp.sfu.ca/t/keyword-indexing-for-word-documents-doc-docx/29040. I may get back to this refactoring Wednesday and/or Thursday, then will be out of office for a few days. I haven't done anything beyond searching for usages of GridCellProvider instances as per the above commits. |
@bozana, interesting consideration. I wonder what practically this would look like. Individual setting overrides would be a UI/UX nightmare, I suspect; so perhaps groups of settings? But if we group settings and functionality together, doesn't that make for a separate plugin? |
Thanks, @ctgraham. Maybe with your permission I'll run with the |
Permission happily granted. |
@ctgraham, yes, I think you are right... |
@asmecher, unless I'm misreading the current state of master, I don't think the work on adding the |
Yes, thanks -- I fell into a parallel but distinct rabbit hole. |
pkp-lib/classes/security/authorization/PluginAccessPolicy.inc.php Lines 45 to 74 in f8d959b
based on PluginLevelRequiredPolicy :pkp-lib/classes/security/authorization/internal/PluginLevelRequiredPolicy.inc.php Lines 44 to 47 in f8d959b
This policy framework will need to be reworked in order to implement site/context inheriting/overriding plugins (or even just plugins that work in both a site and context, like Google Analytics). |
The usage stats plugin does something like this with different settings available at context/site level. See #6351. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In OJS master (with a nod to OMP master as well):
Currently we have a hard distinction between "Site Plugins" and "not Site Plugins" via
Plugin::isSitePlugin()
but this could be enhanced:The text was updated successfully, but these errors were encountered: