Create or Edit User Roles
WP-CRM System allows you to provide give access to WP-CRM System reports and records to users based on the role they have on your site. By default, regular WordPress installs come with five roles: Administrator, Editor, Author, Contributor, and Subscriber (multi-site installs also come with a sixth role, Super Admin). Each of these roles is also granted various capabilities, such as the ability to install plugins, publish posts, or edit other user’s posts.
Click here to learn more about WordPress Roles and Capabilities.
In order to make the system easy for the majority of people to use, we made the basic setting available that allows you to select the user roles that can interact with WP-CRM System.
We realize, however that some sites may have needs that go beyond the basic settings. For example, you may not want your WP-CRM System users to be able to have all the capabilities of an Editor (delete pages, for example), but should still be able to access WP-CRM System.
If this is the case, you can create a new user role with custom capabilities, or even edit capabilities of existing user roles using a plugin like User Role Editor.
Create a New User Role #
First, install and activate the User Role Editor plugin. Next, visit Users > User Role Editor from your WordPress dashboard. Click on Add Role from the menu on the right, and fill in the name and ID of your new role. Click the Add Role button.
Once your new user role is created it will only have the ‘read’ capability on your site. This is the equivalent to a Subscriber. Any users with this role won’t be able to edit anything, so you’ll need to assign some capabilities to the role first.
The user will need a certain capability to view reports. This capability will vary depending on the role you selected in WP-CRM > Settings. The following list will help you determine which capability will be needed. You can find these capabilities in the “Core Capabilities” section towards the top.
- If you selected Administrator, you should assign manage_options capability
- If you selected Editor, you should assign edit_pages capability
- If you selected Author, you should assign publish_posts capability
- If you selected Contributor, you should assign edit_posts capability
- If you selected Subscriber, you should assign read capability
You will also need to specify what users assigned to this role can do with your WP-CRM System records.
The possible capabilities will be displayed in the “Custom Capabilities” section.
//Contact Capabilities edit_wpcrm-contact read_wpcrm-contact delete_wpcrm-contact edit_wpcrm-contacts edit_others_wpcrm-contacts publish_wpcrm-contacts read_private_wpcrm-contacts read_wpcrm-contact delete_wpcrm-contacts delete_private_wpcrm-contacts delete_published_wpcrm-contacts delete_others_wpcrm-contacts edit_private_wpcrm-contacts edit_published_wpcrm-contacts create_wpcrm-contacts //Task Capabilities read_wpcrm-task delete_wpcrm-task edit_wpcrm-tasks edit_others_wpcrm-tasks publish_wpcrm-tasks read_private_wpcrm-tasks read_wpcrm-task delete_wpcrm-tasks delete_private_wpcrm-tasks delete_published_wpcrm-tasks delete_others_wpcrm-tasks edit_private_wpcrm-tasks edit_published_wpcrm-tasks create_wpcrm-tasks //Organization Capabilities read_wpcrm-organization delete_wpcrm-organization edit_wpcrm-organizations edit_others_wpcrm-organizations publish_wpcrm-organizations read_private_wpcrm-organizations read_wpcrm-organization delete_wpcrm-organizations delete_private_wpcrm-organizations delete_published_wpcrm-organizations delete_others_wpcrm-organizations edit_private_wpcrm-organizations edit_published_wpcrm-organizations create_wpcrm-organizations //Opportunity Capabilities read_wpcrm-opportunity delete_wpcrm-opportunity edit_wpcrm-opportunitys edit_others_wpcrm-opportunitys publish_wpcrm-opportunitys read_private_wpcrm-opportunitys read_wpcrm-opportunity delete_wpcrm-opportunitys delete_private_wpcrm-opportunitys delete_published_wpcrm-opportunitys delete_others_wpcrm-opportunitys edit_private_wpcrm-opportunitys edit_published_wpcrm-opportunitys create_wpcrm-opportunitys //Project Capabilities read_wpcrm-project delete_wpcrm-project edit_wpcrm-projects edit_others_wpcrm-projects publish_wpcrm-projects read_private_wpcrm-projects read_wpcrm-project delete_wpcrm-projects delete_private_wpcrm-projects delete_published_wpcrm-projects delete_others_wpcrm-projects edit_private_wpcrm-projects edit_published_wpcrm-projects create_wpcrm-projects //Campaign Capabilities read_wpcrm-campaign delete_wpcrm-campaign edit_wpcrm-campaigns edit_others_wpcrm-campaigns publish_wpcrm-campaigns read_private_wpcrm-campaigns read_wpcrm-campaign delete_wpcrm-campaigns delete_private_wpcrm-campaigns delete_published_wpcrm-campaigns delete_others_wpcrm-campaigns edit_private_wpcrm-campaigns edit_published_wpcrm-campaigns create_wpcrm-campaigns
You can choose to allow your custom role to manage as many or as few of these capabilities as you’d like. For example, perhaps you want to have a role that only can manage opportunities, tasks and projects, while another role will manage contacts and organizations.
Once you are done adding the custom capabilities and the one required core capability to your new user role, click the Update button to save your changes. You can come back to this page at any time to make changes if you need to add or remove capabilities to your role(s).
Edit Existing Roles #
You can edit existing roles, including custom roles that you have created in the same way as how you created the new role.
Simply select the role you wish to edit from the drop down menu at the top of the User Role Editor screen. The page will refresh with all the capabilities available to that role checked off. Check or uncheck the capabilities as needed and click Update to save your changes.
Use this with caution. If you edit a role that belongs to another plugin, your users may lose some functionality that may be required of that plugin.
It may be better to duplicate an existing role by following the Add Role steps above, and selecting a role to duplicate when setting up the new role. You can then add or remove capabilities as needed without worrying about breaking another plugin.