-
Notifications
You must be signed in to change notification settings - Fork 0
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
Complete user roles implementation #17
Comments
The comment here, particularly the quoted part below, suggests to me that
Because
None of these approaches was particularly sound. Thanks to some new hooks that were added in core version 5.9, particularly It should be noted that the use of these hooks, plus another feature that is being used in the database upgrade, means that the plugin's minimum core version needs to be lifted to 5.9 on the next release. |
v1.2.0, specifically the work for #11, introduced funnel types that support full site editing.
When a funnel type is registered, three new user roles are automatically created for that funnel type:
{$funnel_type}_contributor
(can create funnels){$funnel_type}_author
(can publish funnels){$funnel_type}_editor
(can edit other people's funnels)These user roles can then be assigned to users, using a plugin such as Members.
However, registering funnel types can only be done by an Administrator user role because it is gated behind the
edit_theme_options
capability. This will change with https://core.trac.wordpress.org/ticket/54516, allowing the plugin to support user roles for the registration of funnel types as well.This could also be done through a similar three-tier model:
contribute_funnels
(can create funnel types)author_funnels
(can publish funnel types)edit_funnels
(can edit other people's funnel types)Assigning these user roles could then allow non-Administrator users to create new funnel types without getting access to the general theme options.
Granting the permissions to users who have these roles could be done through the
map_meta_cap
oruser_has_cap
filters. The part that is currently uncertain is whether it will involve theedit_post
oredit_template
meta capability, and this will depend on the implementation of the core patch.The text was updated successfully, but these errors were encountered: