PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV 26 feature!
  • In this lesson you will learn the following concepts
  • Overview
  • Integrating the user groupware
  • Configuring the user groupware
  • Creating users and groups
  • Defining rights
  • Application test
  • Disabling the user groupware
Lesson 4.9. Identifying the user: user groupware
In this lesson you will learn the following concepts
  • What is the user groupware?
  • Integrating the user groupware.
  • Configuring the user groupware.
  • Testing the user groupware.
Lesson duration

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
An application can be used by several contributors with different profiles. Several access levels can be defined according to the user.
Let's take a simple example: a sales management application that offers the following features:
  • Viewing the price list.
  • Modifying the price list.
  • Entering orders.
  • Entering customers.
Access may vary according to the user. For example:
  • administrative assistants can see the price list and create orders.
  • sales representatives can see the price list, place orders and create new customers.
  • sales directors have access to all options.
WINDEV allows you to easily manage these access levels in your applications via the user groupware.
We are going to include the user groupware in our "WD Full Application" application and to configure it.

Note

Caution: It is necessary to follow this lesson with WINDEV Update 1. The configuration options of the user groupware have been reorganized based on this version.
  • Open the project you worked on in the previous lesson.
    1. Go to the WINDEV home page (Ctrl + <).
    2. On the home page, click "Tutorial", then in "Part 4 - Full application with data", double-click "Full application (Exercise)".
    3. A dialogue box prompts you to open the project you worked on in the previous lesson. You can open the local copy or the original project. Select "Open the local copy".

Answers

A corrected project is available. This project allows you to follow this lesson. To open the corrected project, go to the home page and click "Tutorial", then in "Part 4 - Full application with data", double-click "Full application (Answers)".
Integrating the user groupware
  • To include the user groupware in the "WD Full Application" project:
    1. On the "Project" tab, in the "Project" group, click "User groupware". The user groupware configuration window is displayed. Enable the user groupware by clicking "Enabled".
      User groupware settings
    2. The "Standard User Groupware" and "Automatic start" options are selected by default.
      • The "Standard User Groupware" option integrates the User Groupware into the application. This user groupware will be associated only to your application, and the rights will be defined from the application.
        Remark: It is also possible to use a BaaS (Backend as a Service) user groupware with rights management via a server. For more details, see the online help.
      • The "Automatic start" option indicates that the user groupware is started at the same time as the application.
        Remark: the "Manual start (by programming)" option allows you to define when the user groupware should be started.
    3. Keep the options selected by default.
    4. Click the "Options" tab.
      User groupware settings
      This tab allows you to specify the different customization options of the user groupware. Different customization options are available:
      • No customization (default): all elements of the user groupware are integrated into your application. This allows you to follow future changes in the groupware. In addition, the project skin template can be applied to the groupware windows.
      • Customize login UI (log in, register): this option allows you to integrate the WDGPU_WD component containing 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. This allows you to follow future changes in the groupware. In addition, the project skin template can be applied to the groupware windows.
      • Full customization (expert mode): this option allows you to integrate the WDGPU_WD component containing all the elements required 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.
    5. Keep the "No customization" option.
    6. 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.

      Note

      If you (or the end user) use Windows Vista or a more recent operating system, it is recommended to select "Data directory". To do so, click the "Default directory" link: a popup shows the different options available.
    7. In the "Files" tab, you can also define the user authentication mode:
      • management via the user groupware.
      • 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.
    8. 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).
    9. Validate. A message is displayed, indicating that a Supervisor user is created.

      Note

      The supervisor is the default user. The fist time the application is started, log in with the name: "supervisor". You will be able to define the password used by the supervisor.
      Groupware login
    10. Validate this message. The user groupware is included in the application.
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.

Note

The users can be configured:
  • when developing 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.
    3. Define the password and confirm it. Validate.
    4. A new menu appears, allowing you to either test or configure the application.
      User groupware menu
    5. Select "Configure groupware".

Creating users and groups

  • To configure the user groupware, we are going to create a "Test_1" user and associate this user with the "Tests" group. Then, we are going to configure the management of rights for the group.
    Groupware settings
  • To create a 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

        Note

        By default, the password is hidden during the input. To check the password, click on the eye icon: the password will remain visible as long as the mouse button is held down.
        Groupware settings
    3. Click "Save". The "Test_1" user appears in the list of users defined for the user groupware.
  • To create a new group of users:
    1. Click "New" below the "Groups" area. The screen for entering a new group is displayed.
    2. Enter the name of the group: "Tests".
      Groupware settings
    3. Click "Save". The "Tests" group appears in the list of groups defined for the user groupware.
  • To 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 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 the rights:
    1. Click "Manage rights" on the left of the window.
    2. Select the "Tests" group.
    3. Click "Next".
    4. The window that is displayed allows you to select each window or report of the application.
      • For each window or report, it is possible to specify whether or not the element will be accessible 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.
  • To forbid the access to the "WIN_Sending_an_email" window:
    1. Select the window in the list.
    2. Click "Forbid access".
      Define rights
    3. The window cannot longer be accessed.
  • Define the rights on the "WIN_Menu" window. This window contains a menu option used to display the window for email management as well as the "New" and "Modify" buttons.
    1. Select the "WIN_Menu" window.
    2. Click "Next".
    3. The window for configuring the rights on the window controls is displayed.
    4. Switch the "BTN_Modify" and "BTN_New" buttons to "Grayed":
      Define rights
    5. Set the "Send an email" menu option to "Invisible":
      Define rights
    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. If necessary, select the tab "List of products". You will notice that the "New" and "Modify" buttons are grayed and that the "Send an email" option is invisible.
      Application test
    4. Exit from the application and go back to the editor.
Disabling the user groupware
The user groupware will no longer be used in the rest of this tutorial. Therefore, it can be disabled.
  1. On the "Project" pane, in the "Project" group, click "User groupware".
  2. In the window that appears, in the "General" tab, in the "Enable User Groupware" section, click "Disabled".
  3. Validate.

Note

If you run automatic 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.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 26
Comments
Click [Add] to post a comment