DiscipleTools / disciple-tools-webform

Add a lead form to any website and integrate those leads into the Disciple.Tools system. Build custom lead forms through an admin interface, assign leads to dispatcher, and tag with sources. Special security design allows for forms to be served from one system and privately transferred to the Disciple.Tools system.
https://disciple.tools/plugins/webform/
Other
2 stars 6 forks source link

Allow Webform to be used with the D.T admin role #44

Closed corsacca closed 3 years ago

corsacca commented 3 years ago

If a user only has the dt admin role, then they can't access the webform settings.

squigglybob commented 3 years ago

@corsacca I can take this one

squigglybob commented 3 years ago

webform settings seem to be accessible with only dt_admin role set. Maybe this is already fixed?

squigglybob commented 3 years ago

Nope it wasn't fixed. Clicking on 'add new form' resulted in the permission denied error which states that the user can't create a page.

I've changed the dt_webform post type to have capability_type => 'post' instead of page, and that seems to fix it.

@ChrisChasm @corsacca Is it ok to change the capability type on this posttype? Or would it be better to add the capability of editing a page to the dt_admin role?