[Bug 36205] New: Plugins should be able to create permissions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Bug ID: 36205 Summary: Plugins should be able to create permissions Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Some plugins expose additional functionality that should only be exposed to users with permission to access them. We could perhaps allow plugins to add sub-permissions to the existing 'plugins' flag to facilitate this? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28957 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Due to the challenges of bug 36561 and bug 37144, I was thinking that doing a plugin might be a good way to start moving on those, but... they'd depend on this I reckon. -- I think one thing to keep in mind is that there are places in Koha where having any subpermission is enough to get granted certain powers... -- Challenging to have a translation-friendly way of doing this I expect... since we'd need to inject content into the /cgi-bin/koha/members/member-flags.pl template... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 --- Comment #2 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to David Cook from comment #1)
Due to the challenges of bug 36561 and bug 37144, I was thinking that doing a plugin might be a good way to start moving on those, but... they'd depend on this I reckon.
--
I think one thing to keep in mind is that there are places in Koha where having any subpermission is enough to get granted certain powers...
--
Challenging to have a translation-friendly way of doing this I expect... since we'd need to inject content into the /cgi-bin/koha/members/member-flags.pl template...
What if we baked a new top level "plugins_permissions" module bit into Koha, and then each plugin could add sub-permissions under that module as needed? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Kyle M Hall (khall) from comment #2)
What if we baked a new top level "plugins_permissions" module bit into Koha, and then each plugin could add sub-permissions under that module as needed?
I'm into this idea, but how would we display them in the UI? -- It looks like the current display uses "koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc" which is translation friendly, but is hard-coded. Notably, it looks like that include doesn't have a default/fallback, but we could change that... It looks like the "permissions" table does contain a "description" field, so that could be used instead, but it's not translation friendly. That said, we don't really have a solid translatable plugin approach yet... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 --- Comment #4 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to David Cook from comment #3)
(In reply to Kyle M Hall (khall) from comment #2)
What if we baked a new top level "plugins_permissions" module bit into Koha, and then each plugin could add sub-permissions under that module as needed?
I'm into this idea, but how would we display them in the UI?
--
It looks like the current display uses "koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc" which is translation friendly, but is hard-coded. Notably, it looks like that include doesn't have a default/fallback, but we could change that...
It looks like the "permissions" table does contain a "description" field, so that could be used instead, but it's not translation friendly.
That said, we don't really have a solid translatable plugin approach yet...
Yeah, I think translations for plugins is definitely needed to bring them to the next level of international support. That being said we can treat that as a separate issue. Imagine a new top level permission named "Plugin permissions" or something more better. We could leave it checkable to give full plugin permissions to any plugin permissions that may come along, but it would be empty by default. Plugins could then declare permissions by inserting them into the permissions table for this new top level bit, and they should then show up as a checkable sub-permission just like any current sub-permission. Does that make sense? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Kyle M Hall (khall) from comment #4)
Yeah, I think translations for plugins is definitely needed to bring them to the next level of international support. That being said we can treat that as a separate issue.
I suppose I was thinking we might want to think about it in advance just to make sure we try out best to accommodate future changes.
Imagine a new top level permission named "Plugin permissions" or something more better. We could leave it checkable to give full plugin permissions to any plugin permissions that may come along, but it would be empty by default. Plugins could then declare permissions by inserting them into the permissions table for this new top level bit, and they should then show up as a checkable sub-permission just like any current sub-permission. Does that make sense?
Yep, I think that makes sense. I suppose we'll need namespaces. In some ways, it's too bad we have "api_namespace" and not just "plugin_namespace". We could have "permission_namespace" though. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36205 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org