User Roles and Permissions guide

This guide explains the roles and capabilities associated with the Post to Google My Business (PGMB) plugin. Understanding these roles will help you assign permissions effectively and ensure smooth collaboration across your team.


Capabilities overview

The PGMB plugin uses specific WordPress capabilities to control what different user roles can do within the plugin. Below is an explanation of each capability:


1. pgmb_manage_google_accounts

This capability allows the user to add, manage, or delete their own Google accounts and select locations to publish posts.

What users can do with this capability:

  • Add new Google accounts to the plugin.
  • Manage and edit their own Google accounts.
  • Delete Google accounts they added.
  • Select locations tied to the connected Google accounts where posts will be published.

Typical use case:

Assign this capability to users responsible for creating and managing their own Google accounts and setting up post locations.


2. pgmb_see_others_accounts

This capability allows the user to see Google accounts added by other users within the site but not delete or manage them.

What users can do with this capability:

  • View all Google accounts connected to the plugin, including accounts added by other users.
  • Publish posts to locations associated with accounts added by other users.
  • Manage their own accounts if they also have the pgmb_manage_google_accounts capability.

What users cannot do with this capability:

  • Delete Google accounts added by other users.
  • Modify settings or details of accounts they do not own.

Typical use case:

Assign this capability to users who need to collaborate on posting content to locations associated with accounts managed by others, such as content creators or managers.


3. manage_options

This is a standard WordPress capability that allows the user to access the plugin settings.

What users can do with this capability:

  • Access and modify plugin settings, such as API keys, default configurations, and any global plugin options.
  • Control features that apply site-wide.

Typical use case:

This capability is typically reserved for site administrators or trusted users who need full control over the plugin’s configuration and settings.


Behavior when custom permissions are not assigned

If a user does not have any of the custom permissions (pgmb_manage_google_accounts or pgmb_see_others_accounts):

  • They will not see or manage any Google accounts.
  • Posts they create in WordPress will still be published to the default location(s) configured by users with the appropriate permissions.

Configuring roles and permissions

  1. Default roles: By default, only administrators will have access to all capabilities. If you want to grant specific permissions to other roles (e.g., editors, contributors), you can do so using a role management plugin like User Role Editor.
  2. Assigning capabilities:
    • To allow users to manage their own Google accounts, assign only the pgmb_manage_google_accounts capability.
    • To allow users to view and publish posts to accounts managed by others, assign only the pgmb_see_others_accounts capability.
    • To grant access to plugin settings, assign the manage_options capability.

Examples of role configurations

Here are some examples of how you might assign these capabilities based on different team structures:

Example 1: single administrator site

  • The site administrator handles everything (Google accounts, plugin settings, and oversight). No changes are required, as the admin role already has all capabilities.

Example 2: multi-user team

Role Capabilities Description
Administrator manage_options + all PGMB roles Full access to settings, Google accounts, and other users' accounts.
Manager pgmb_manage_google_accounts + pgmb_see_others_accounts Add and manage their own accounts, and view/publish posts to accounts added by others.
Editor pgmb_see_others_accounts View all accounts and publish posts to them but cannot manage or delete them.
Contributor None Cannot manage or view any Google accounts but can post to default locations set by admins.

Best practices for managing roles

  • Assign pgmb_see_others_accounts strategically: Use this capability for users who need to collaborate on content without giving them control over account management.
  • Restrict access to manage_options: Reserve this capability for administrators or trusted users who need full control of the plugin settings.
  • Combine permissions carefully: If you want users to manage their own accounts while also being able to view accounts added by others, assign both pgmb_manage_google_accounts and pgmb_see_others_accounts.

Troubleshooting permissions

If a user cannot access certain sections of the plugin or features:

  1. Verify their assigned role and capabilities using a role management plugin.
  2. Ensure they have the necessary combination of capabilities:
    • pgmb_manage_google_accounts to manage their own accounts.
    • pgmb_see_others_accounts to view accounts added by others.
  3. Ensure there are no conflicts with other WordPress plugins managing roles or permissions.
  4. Consult the PGMB plugin settings or reach out to support if the issue persists.

By assigning capabilities thoughtfully and understanding how they interact, you can create a secure and efficient workflow for your team while ensuring the PGMB plugin operates as intended.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us