The User Role Management Plugin is designed to provide advanced control over WordPress user roles and capabilities. It allows administrators to create, edit, clone, and delete roles with precision, assign temporary roles that expire automatically, integrate Google OAuth2 for streamlined login, and monitor all role-based activities through audit logs.
The default WordPress user role system provides a basic structure with predefined roles and capabilities such as:
- Administrator – Full access to all admin features, settings, plugins, and content.
- Editor – Has full control over all posts and pages on the site, including those created by other users. They can add, edit, publish, or delete any content.
- Author – Can create, edit, and publish their own posts, but cannot touch content created by others.
- Contributor – Can write and edit their own posts, but they don’t have permission to publish them. Their posts need to be reviewed by someone with higher access.
- Subscriber – Has the most limited role. They can log in, update their profile, and read content, but cannot create or manage posts.
- Customer (WooCommerce) – Can view orders, manage their account, and make purchases.
- Shop Manager (WooCommerce) – Manages store products, orders, and customers, but can’t access full site settings.
While this setup works for simple websites, it lacks the flexibility required for more advanced needs, such as assigning temporary roles, creating custom capabilities, or managing user access with precision.
A User Role Management Plugin helps fill these gaps by allowing site owners to fully control user roles and adjust their capabilities. This is especially useful for large teams, membership sites, or stores that require strict role-based access control.
Key Features of the User Role Management Plugin #
The plugin consists of four main sections to provide a streamlined user role management. They are:
1. User Role Manager Section #
This section focuses on managing the users and their role assignments. It provides a list of all users along with their currently assigned roles. User roles can be updated efficiently by selecting a user and utilizing the Add Role option to assign a new role or the Remove Role option to revoke an existing one.
Additionally, temporary roles can be assigned in the “Assign Temporary Role” section, allowing you to grant access for a limited time after which the role is automatically removed or returned to the previous state.
Key Actions in this Section:
- View all users and their assigned roles
- Select a user to add or remove roles instantly
- Assign temporary roles with automatic expiry for time-bound access
2. Add Role Section #
The Add Role section allows you to define and manage custom roles and their capabilities within your site. It offers flexibility to tailor user permissions beyond the default WordPress setup.
Key Actions in this Section:
- Create New Role: Enables you to establish a new role by specifying a custom name and assigning tailored capabilities according to your site’s requirements.
- Clone Role: Lets you duplicate an existing role with all its capabilities, making it easy to create similar roles quickly.
- Delete Role: Enables you to remove unnecessary or outdated custom roles to keep the role structure clean and relevant.
- Add Capability: Lets you define a new, custom capability to represent a unique permission not available by default in WordPress.
- Delete Capability: Enables you to remove a custom capability that is no longer required.
3. OAuth2 Settings Section #
The OAuth2 Settings section allows you to connect your WordPress site with Google OAuth2 for secure and simplified user login. This section is especially useful for WordPress sites that want to let users log in with their Google accounts instead of traditional usernames and passwords.
- OAuth2 Integration: Enables you to configure your site to accept login via Google using OAuth2 authentication.
- Client Details Configuration: You can enter your Google-provided Client ID, Client Secret, Authorization URL, Token URL, and User Info URL to establish a secure connection.
- Role Mapping: Allows you to define default roles for users logging in through Google OAuth. Typically, they are registered as Subscribers or Customers, but you can customize this mapping using a Role Map JSON.
4. Audit Logs #
The Audit Logs section gives you a comprehensive view of all changes made to user roles and capabilities on your site. It’s designed to help administrators keep track of role-related actions for transparency and security.
FAQ #
- Can I customize the capabilities for WooCommerce roles like Shop Manager or Customer?
Yes. You can clone or edit these roles in the Add Role section and adjust capabilities to suit your store’s needs.
- Can I create a role without assigning it to a user right away?
Yes. Creating a role only defines the permissions that come with that role, it doesn’t assign the role to anyone automatically. You can create roles ahead of time in the Add Role section and assign them to users later from the User Role Manager section.