WordPress default roles
Hi,
We have a scenario where we would like WordPress editors to be able to install new libraries / content types.
Looking at your class-h5p-plugin.php line 631
<code>self::map_capability($role, $role_info, 'manage_options', 'manage_h5p_libraries');</code>
I can change that to an editor capabaility to fo this, but don't want to hack the core code.
Any suggestions? Would you be able to add a filter so we devs can return their own set of permissions, or perhaps in the H5P settings allow an option for minimum capability to install new libraries.
The reason is we don't want our editors to have access to themes / plugin changes but we DO trust them to manage their H5P content and unless the content type has already been installed they can't create that item type.
Many thanks,
Alex Furr
otacke
Fri, 09/27/2019 - 17:27
Permalink
Hi Alex!All you need to do is
Hi Alex!
All you need to do is to install a WordPress plugin that allows you to manage the capabilities and to set the rights/roles to suit your needs - WordPress doesn't ship with its own role manager, unfortunately.
Best,
Oliver
alexfurr
Mon, 09/30/2019 - 12:06
Permalink
Overkill?
Hi Oliver,
That seems like overkill to me - I'll create a simple plugin that adds that option as part of the H5P interface as I'm sure it would be useful to others and share when complete.
best wishes,
Alex
otacke
Mon, 09/30/2019 - 20:03
Permalink
Hi Alex!I didn't say it was a
Hi Alex!
I didn't say it was a one-fits-all solution, but it will allow you to set capabilities per role as you like.
Cheers,
Oliver
alexfurr
Wed, 10/02/2019 - 11:15
Permalink
Workaround plugin
Hi Oliver,
If it's any use to anyone else here is a light weight plugin that gets round this issue without installing a user roles plugin.
https://github.com/alexfurr/h5p-role-settings
It also ensures the H5P hub is always active, as we've had problems in the past when it's become inactive for some reason.
Hope it helps someone else...
otacke
Wed, 10/02/2019 - 14:19
Permalink
Hi Alex!I think what you
Hi Alex!
I think what you wrote is rather a customization script that a plugin. Hope my remarks help:
Cheers,
Oliver