ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV 2024 feature!
Help / WINDEV Tutorial / Tutorial - User Groupware
  • User login: User Groupware
  • Overview
  • Integrating the User Groupware
  • Opening the example project
  • Integrating the User Groupware
  • Configuring the User Groupware
  • Creating users and groups
  • Defining user and group rights
  • Application test
  • Further information
  • Conclusion

Tutorial - User Groupware

User login: User Groupware
We will cover the following topics:
  • What is the User Groupware?
  • Integrating the User Groupware.
  • Configuring the User Groupware.
  • Testing the User Groupware.
Durée de la leçon 20 mn
Overview
An application can be used by several contributors with different profiles. Several access levels can be defined according to the user.
For example:
  • administrative assistants can see the price list and create orders.
  • salesmen can see the price list, place orders and create new customers.
  • managers have access to all the options.
WINDEV allows you to easily manage these access levels via the User Groupware.
We are going to include the User Groupware in our "WD Full Application" application and to configure it.

Integrating the User Groupware

Opening the example project

This tutorial uses the "WD Full Application" project. To open this example:
  1. Go to the WINDEV home page (Ctrl + <).
  2. On the home page, click "Tutorial", then in "Tutorial - WINDEV Application: Manage data", double-click "Full application - Answers".

Integrating the User Groupware

You can integrate the User Groupware into the project with just a few clicks:
  1. On the "Project" tab, in the "Project" group, click "User Groupware". The project configuration window appears, and the "GPU / Private Store" tab is automatically selected.
    If you have multiple project configurations, the User Groupware can be configured for just one of them. The login window will be displayed only when testing this configuration.
  2. In "User Groupware", click "Change". The User Groupware configuration window appears.
  3. Enable the User Groupware by selecting "Enabled".
    User Groupware settings
Configuring the User Groupware
As you can see, the User Groupware settings window contains several tabs and numerous options. We will through them to configure the User Groupware for our example.
  1. In the "General" tab, the "Standard User Groupware" and "Automatic start" options are selected by default. Let's see what they mean:
    • The "Standard User Groupware" option integrates the User Groupware and associates it with the current project configuration. Rights are defined in the application.
      It is also possible to use a BaaS (Backend as a Service) User Groupware with rights management via a server. For more details, see User Groupware.
    • The "Automatic start" option indicates that the User Groupware is started at the same time as the application.
      The "Manual start (programmatically)" option allows you to define when the User Groupware should be started.
  2. Keep the options selected by default.
  3. Click the "Options" tab.
    User Groupware settings
    This tab allows you to specify the different customization options of the User Groupware. Let's take a look at the different customization modes available:
    • No customization (default): all the elements of the User Groupware are integrated into the application. All changes made in the User Groupware are automatically integrated with each update. You can also apply the project skin template to User Groupware windows.
    • Customize login UI (log in, register): the WDGPU_WD component is integrated into your project. This component contains only the WIN_GPU_WD_Login window. This window can be customized according to your needs.
      The other windows of the User Groupware are integrated directly into your application. All changes made in the User Groupware are automatically integrated with each update. You can also apply the project skin template to User Groupware windows.
    • Full customization (expert mode): the WDGPU_WD component is integrated into your project. This component contains all the elements needed to manage the User Groupware. All elements can be customized. However, this option does not allow you to follow future changes in the User Groupware.
  4. For this example, keep "No customization".
  5. Select the "Files" tab.
    User Groupware settings
    This tab allows you to define the format and location of the User Groupware data files. In this case, we will use HFSQL Classic data files, in the default directory.
    You can also define the user authentication mode:
    • User Groupware (we will use this option).
    • LDAP directory or Active Directory. In this case, when installing the application, the user will be able to enter the parameters of their LDAP directory or Active Directory.
    • Windows authentication.
  6. Select the "OAuth" tab.
    User Groupware settings
    This tab allows you to authorize the use of a specific connection service. For the specified service, it is necessary to specify the corresponding identifiers (provided when registering the application with the selected service).
We have now finished setting the User Groupware options. We can now validate the settings window.
  1. Confirm changes in the User Groupware description window .
  2. A message is displayed, indicating that an administrator account is created by default.
    The supervisor is the default user. The first time you launch the application, you'll be able to set the password used by the supervisor.
  3. Validate this message. The User Groupware is included in the application.
  4. Validate the project configuration window.
Configuring the User Groupware
Configuring the groupware consists in defining the different application users as well as their rights on the different windows and controls.
Users can be configured:
  • during the development process, by testing the application. The necessary data files (regarding the users and their rights) can be installed along with the application.
  • when the application is installed, by the administrator of the application.
Let's now test our application to configure the User Groupware:
  1. Test the project (click Test project in the quick access buttons). A login window is displayed.
  2. Log in as "supervisor". Define the password and confirm it.
    Groupware login
  3. Validate.
  4. A new menu appears, allowing you to either test or configure the application.
    User Groupware menu
  5. Select "Configure groupware". The User Groupware configuration window of the application being tested appears.

Creating users and groups

To configure the User Groupware, we will create a user named "Test_1" and associate it with the "Tests" group. Then, we will set the group rights.
Groupware settings
First, let's create the "Test_1" user:
  1. Click "New" below the "Users" area. The screen for entering a new user is displayed.
  2. Enter the following information:
    • Username: Test_1
    • Last name: Test_1
    • Password: Test_1
      Groupware settings
  3. Click "Save". The "Test_1" user appears in the list of users defined for the User Groupware.
Now we're going to create a user group:
  1. Click "New" below the "Groups" area. The group creation window appears.
  2. Name the group "Tests".
    Groupware settings
  3. Click "Save". The "Tests" group appears in the list of groups defined for the User Groupware.
Now, let's simply associate the user with the group:
  1. Select the "Test_1" user in the window.
  2. Drag and Drop the "Test_1" user to the "Tests" group.
    Groupware settings
  3. The association is completed.

Defining user and group rights

We are now going to define the rights for the "Tests" group. These rights will be granted to all users in the group. In our example, the users in the "Tests" group will not be allowed to:
  • Open the window for sending emails.
  • Create or modify a product.
To define rights for the "Tests" group from the User Groupware administration window:
  1. Click "Manage rights" on the left of the window.
  2. Select the "Tests" group.
  3. Click "Next".
The window that appears allows you to select each window or report of the application.
  • For each window or report, it is possible to specify whether it can be accessed by the group.
  • For each window, you can define whether the window controls will behave like the application (default mode) or whether they will be disabled, invisible or grayed out.
In our case, we want to prevent access to "WIN_Sending_an_email":
  1. Select the window in the list.
  2. Click "Forbid access".
    Rights settings
  3. The window can no longer be accessed.
Now, we will define the rights on "WIN_Menu". This window contains:
  • a menu option to open the email management window: we will make this option invisible for the "Tests" group.
  • the "New" and "Modify": we will gray these buttons out.
To do so:
  1. Select the "WIN_Menu" window.
  2. Click "Next".
  3. A list with all the controls in the window appears, and allows you to set the rights on each control.
  4. Switch the "BTN_Modify" and "BTN_New" buttons to "Grayed":
    Rights settings
  5. Set the "Send an email" menu option to "Invisible":
    Rights settings
  6. Click "Save".
  7. Close the configuration window.
  8. The WINDEV editor is displayed.

Application test

We will test the application using the "Test_1" username.
  1. Test the project (click Test project in the quick access buttons). A login window is displayed.
  2. Log in as "Test_1" with the "Test_1" password. Validate.
  3. The application starts.
  4. If necessary, select the tab "List of products". You will notice that the "New" and "Modify" buttons are grayed out and that the "Send an email" option is invisible.
    Application test
  5. Exit the application and go back to the editor.
Further information
In this tutorial, we've looked at the steps involved in integrating and managing the User Groupware. We covered the simplest integration method. For more details, see User Groupware.
Conclusion
In the next tutorials, we will use the "WD Full Application" project again and we will no longer use the User Groupware.
Therefore, we are going to disable the User Groupware in the application.
  1. On the "Project" tab, in the "Project" group, click "User Groupware".
  2. The configuration window of the current platform opens on the "GPU / Private Store" tab.
  3. In "User Groupware", click "Change".
  4. In the window that appears, in the "General" tab, in the "Enable User Groupware" section, click "Disabled".
  5. Validate the User Groupware configuration window.
  6. Validate the project configuration window.
If you run automated tests in your application, configure the User Groupware to avoid using the login window. Complete the corresponding fields in the "Automatic login for test mode" section, in the "Options" tab of the groupware settings window.
Table of contents
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 12/14/2023

Send a report | Local help