|
|
|
|
- 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. User login: 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.
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.
- 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 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.
- Open the project you worked on in the previous lesson.
- Go to the WINDEV home page (Ctrl + <).
- On the home page, click "Tutorial", then in "Part 4 - Full application with data", double-click "Full application - Exercise".
- 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 completed project is available. This project allows you to follow this lesson. To open the completed 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:
- On the "Project" tab, in the "Project" group, click "User Groupware". The configuration window of the current platform opens on the "GPU" tab.
| | |  | Note | The User Groupware can be set up for only one of your project configurations. When testing the project, the User Groupware connection window will only be displayed when testing the platform for which the groupware has been enabled. |
- In "User Groupware", click "Change".
- The User Groupware configuration window is displayed. Enable the User Groupware by clicking "Enabled".
- 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 project configuration, 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: User Groupware. - The "Automatic start" option indicates that the User Groupware is started at the same time as the application.
Remark: the "Manual start (programmatically)" option allows you to define when the User Groupware should be started.
- Keep the options selected by default.
- Click the "Options" tab.
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.
- Keep the "No customization" option.
- Select the "Files" tab.
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. |
- 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.
- Select the "OAuth" tab.
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).
- 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.
|
- Validate this message. The User Groupware is included in the application.
- Validate the project configuration window. A message appears, indicating that the project must be recompiled. Click "Yes" to recompile the project.
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:
- Test the project (click
in the quick access buttons). A login window is displayed. - Log in as supervisor.
- Define the password and confirm it. Validate.
- A new menu appears, allowing you to either test or configure the application.
- Select "Configure groupware".
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.
- To create a user:
- Click "New" below the "Users" area. The screen for entering a new user is displayed.
- Enter the following information:
- Username: Test_1
- 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. |
- Click "Save". The "Test_1" user appears in the list of users defined for the User Groupware.
- To create a new group of users:
- Click "New" below the "Groups" area. The screen for entering a new group is displayed.
- Name the group "Tests".
- Click "Save". The "Tests" group appears in the list of groups defined for the User Groupware.
- To associate the user with the group:
- Select the "Test_1" user in the window.
- Drag and Drop the "Test_1" user to the "Tests" group.
- 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:
- Click "Manage rights" on the left of the window.
- Select the "Tests" group.
- 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.
- To prevent access to "WIN_Sending_an_email":
- Select the window in the list.
- Click "Forbid access".
- 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.
- Select the "WIN_Menu" window.
- Click "Next".
- The window for configuring the rights on the window controls is displayed.
- Switch the "BTN_Modify" and "BTN_New" buttons to "Grayed":
- Set the "Send an email" menu option to "Invisible":
- Click "Save".
- Close the configuration window.
- The WINDEV editor is displayed.
Application test - We will test the application using the "Test_1" username.
- Test the project (click
in the quick access buttons). A login window is displayed. - Log in as "Test_1" with the "Test_1" password. Validate.
- The application starts. 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.
- Exit 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. - On the "Project" tab, in the "Project" group, click "User Groupware".
- The configuration window of the current platform opens on the "GPU" tab.
- In "User Groupware", click "Change".
- In the window that appears, in the "General" tab, in the "Enable User Groupware" section, click "Disabled".
- Validate the User Groupware configuration window.
- Validate the project configuration window.
| | |  | Note | 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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|