Tutorial: User Management

Some apps may need multi-user workflows, fortunately Appli provides a robust set of elements and actions that enables the developer to build their own user management system suitable for the needs of their application.

Each project comes with a table to hold user accounts called cdbUsers. To access that table open the data modeler and you’ll see the table that begins with cdbUser. Appli automatically adds a unique identifier suffix to that table, so each version of cdbUser has a slightly different name.

Note: You probably won’t need to deal with that table manually, but it is good to know how to access it. The main reason to open this table is for debugging user accounts while in development.

How to view the cdbUser table

Creating users

There are two ways to create a user, one is using the ready-made Create Account element, and the other is rolling your own form and using the Create Account action.

When a user is created, a record for that user is added to the cdbUsers table.

Login and logout

Use either the Login element or Get Auth, and Logout actions to manage which user is logged into the application.

When to roll your own user management

If your application will handle many users, it might be best to leverage the actions and elements outlined above to roll your own user management workflow. You can even create your own user permissions table and roll different user levels. Appli does not assume a workflow for you, but gives you the tools to roll something bespoke to your needs.

Even if your application is going to be used by multiple users, you might not need to use user management. Such control over user workflows matters only when you need to keep track of which user is doing the actions in your application.

For example, a field data-collection app used by volunteers in a community project might not need to know which data is coming from which volunteers and completely ignore all the user management features.

On the other hand, a company-wide CRM will surely need complex user management features.

This chapter was last updated on Thu 12 Oct 2023 16:52:20 BST