Replies: 25 comments
-
(Throwing at 3.0.2 for no particular reason) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
@asmecher, why is I'm tempted to migrate this function to |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
This is where some refactoring might get persnickety. In my opinion we should be providing the |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
@asmecher, can you comment on the direction of these pulls: |
Beta Was this translation helpful? Give feedback.
-
Rather than adding the |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
@asmecher, let me know what you think of these commits: This drafts adding the Particular questions/concerns would include:
|
Beta Was this translation helpful? Give feedback.
-
Bump: @asmecher |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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? |
Beta Was this translation helpful? Give feedback.
-
Thanks, @ctgraham. Maybe with your permission I'll run with the |
Beta Was this translation helpful? Give feedback.
-
Permission happily granted. |
Beta Was this translation helpful? Give feedback.
-
@ctgraham, yes, I think you are right... |
Beta Was this translation helpful? Give feedback.
-
@asmecher, unless I'm misreading the current state of master, I don't think the work on adding the |
Beta Was this translation helpful? Give feedback.
-
Yes, thanks -- I fell into a parallel but distinct rabbit hole. |
Beta Was this translation helpful? Give feedback.
-
pkp-lib/classes/security/authorization/PluginAccessPolicy.inc.php Lines 45 to 74 in f8d959b based on PluginLevelRequiredPolicy :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). |
Beta Was this translation helpful? Give feedback.
-
The usage stats plugin does something like this with different settings available at context/site level. See #6351. |
Beta Was this translation helpful? Give feedback.
-
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:Beta Was this translation helpful? Give feedback.
All reactions