Users and Permissions

Our plugin is a multi-user application, users access it in WordPress wp-admin area. There's a set of permissions that define what users can and cannot do within our plugin. Similar to WordPress itself, our plugin uses roles to control user permissions. The difference is that our roles are defined and valid within our plugin only, we do not add or modify any global WordPress roles or permissions.

Current Users

To see which WordPress users can currently use the plugin, go to PlainInventory > Users. You'll see the list of users with their current role and permissions summary.

The list of current users


Similar to WordPress, a Permission Role in PlainInventory defines a set of tasks a user assigned the role is allowed to perform within PlainInventory. The plugin comes with 2 built-in roles with self-explanatory names:

To add a new custom permission role, simply go to PlainInventory > Users > Permission Roles > Add New. You'll be able to specify the role name and choose the tasks that it allows to perform. For example, let's create a new role Transactions Manager with Manage Transactions permission.

Add new permissions role

Dependent Permissions

There're some permissions that require other permissions. In this case, these required permissions are automatically set. For example, Manage Transactions permission requires View Inventory to be able to select items for sales and purchases, and View Contacts to be able to choose customers and suppliers. So if you create or update a role with Manage Transactions permission, it automatically sets the View Inventory and View Contacts permissions too.

Permission Connections

Within PlainInventory, each user has only one role. A role is assigned to a user according to Permission Connections. A Permission Connection is a rule that defines which permission role is assigned to a user or a group of users. You can have multiple Permission Connections, and newer connections may override previous ones.

PlainInventory comes with one built-in permission connection:

This connection means that all users of your Wordpress site that have the Administrator role automatically get the Super Administrator role in PlainInventory.

You can view your current permission connections in PlainInventory > Users > WordPress Permission Connections.

Permission connections

To let more users of your WordPress site access PlainInventory, you'll need to add more permission connections.

For example, take your WordPress users that have the Editor WordPress role and make them Transactions Manager (which is a PlainInventory custom role we created earlier).

Simply go to PlainInventory > Users > WordPress Permission Connections > Add New For WordPress Role,

New WordPress to PlainInventory permission connection

After your new permission connection is created, you'll see it in the list of current permission connections. Also in the list of current users you'll see your Editor WordPress users who became Transactions Manager in PlainInventory.

New users can access PlainInventory

Apart from WordPress roles, you can create permission connections for indivudual WordPress users too.

Overriding Permission Connections

Newer permission connections override the roles that are assigned by older connections.

For example, if you want that just one user (for example admin) has full access to PlainInventory, while you have several WordPress administrators. You'll need to add 2 new permission connections: