ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WINDEV concepts / Part 4 - Advanced concepts
  • Overview
  • How does User Groupware work?
  • User level
  • Supervisor level
  • Implementing the User Groupware
  • Adding the User Groupware to an application
  • User Groupware options (standard and BaaS mode)
  • Options specific to the standard User Groupware
  • Options specific to the BaaS User Groupware
  • Testing the application (Standard User Groupware)
  • Creating the WINDEV executable
  • Installing an application that uses the standard User Groupware
  • Configuring the application that uses the standard User Groupware
  • Managing users
  • Managing rights
  • Displaying statistics
  • Migrating data
  • Tips for an application that uses the User Groupware
  • Using groups of controls
  • Visibility of controls
  • Defining rights
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
5. User Groupware in practice
Previous pageTable of contentsNext page
Overview
An application must define the role of different contributors. Several access levels can be defined according to the user.
All users have different responsibilities and requirements. Their field of action must therefore be more or less limited.
Let's take a simple example: a sales management application that offers the following features:
  • View prices,
  • Modify prices,
  • Enter 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.
To manage these access levels in your WINDEV applications, simply integrate the User Groupware. In just a few clicks, a standard application can be transformed into an application that manages several access levels. This feature can be easily implemented.
When starting the application, the manager will be able to create users (identified by their username and password) and give them access to some application features.
How does User Groupware work?
An application that uses the User Groupware has two levels:
  • user level.
  • supervisor level.

User level

The user logs in to the application and accesses the available features.
Remark: You can also log in using an LDAP directory.

Supervisor level

The supervisor logs in to the application and accesses an advanced menu to configure users and their rights, or to start the application.
The configuration window allows the supervisor to:
  • start the application.
  • configure the groupware.
Configuring the groupware consists in creating and associating users and groups, and managing the rights granted to each user (or group) on each window of the application. Rights can be defined for menu options, groups of controls and controls. The supervisor can gray out these elements, make them inactive or invisible. These configurations take precedence over any configuration defined in the program.
For more information on the groupware configuration defined by the supervisor, see Configuring the application that uses the User Groupware.
Remark: The information regarding the users and their rights is stored in data files in HFSQL format (Classic or Client/Server).
Implementing the User Groupware

Adding the User Groupware to an application

To implement the User Groupware in a WINDEV application:
  1. On the "Project" tab, in the "Project" group, click "User Groupware".
  2. In the description window of the current project configuration, in "User Groupware: Disabled", click "Change".
  3. The User Groupware settings window allows you to enable the User Groupware and define:
  • The type and start mode of the User Groupware.
  • The type of customization.
  • The type of database and the location of the User Groupware data files (Standard User Groupware).
  • The user authentication mode (Standard User Groupware).
  • The use of a specific connection service (Standard User Groupware).
  • The BaaS mode settings.
Type of User Groupware
There are various types of groupware:
  • Standard User Groupware: The User Groupware will be integrated in its "Standard" version: the User Groupware will be associated only to your application, and the rights will be defined from the application.
    If this option is selected, two specific tabs are displayed:
    • the "Files" tab, which allows you to specify the type of database and authentication used.
    • the "OAuth" tab, which allows you to specify the connection services available to users.
  • BaaS User Groupware: This option allows you to integrate a BaaS (Backend as a Service) User Groupware and manage rights via a server.
    If this option is selected, two specific tabs are displayed:
    • the "BaaS" tab, which allows you specify the characteristics of the BaaS server, the user accounts and the URLs of the administration sites.
    • the "Email" tab, which allows you to customize the messages to be sent to users (registration validation or password reset emails).
BaaS User Groupware: Required configuration: Two cases may occur:
  • If you are using a PCSCloud platform: the required elements are installed by default on your platform.
    Reminder: PCSCloud is a paid, turnkey solution. For more details, see PCSCloud.
  • If you are not using a PCSCloud platform: install the following elements:
    • an HFSQL server,
    • the reserved server, including the modules for the Mobile User Groupware (WDBaaS).
    For more details, see Configuring a BaaS server (User Groupware and Private Store).
Starting the User Groupware
Several start modes are available:
  • The "Automatic start" option indicates that the User Groupware is started at the same time as the application.
    The User Groupware login window is started before any other window of the application. The project initialization code is executed once the login window is opened and validated.
  • The "Manual start (programmatically)" option allows you to define when the User Groupware should be started.
    The login window will only be opened if gpwOpen (or gpwLogin) is used. This option can be used to execute the project initialization code before opening the login window. This option is useful for a multilingual application for example: a window can be displayed to ask for the application runtime language.

User Groupware options (standard and BaaS mode)

There are multiple User Groupware customization modes:
  • No customization:
    WINDEV takes care of everything. You just need to start the application to configure user access.
    The windows of the User Groupware can automatically use the skin template of the application. Simply check "Apply project skin template to non-customized windows at runtime".
    To get the same appearance for all the windows of the application, it is recommended to always check this option if you use the User Groupware in non-custom mode.
  • Customize login UI:
    The login/register window is automatically integrated into your application. The internal component named WDGPU is included in your project. This component contains the login window and the associated procedure. You can customize the connection to the User Groupware.
  • Full customization (expert mode) - Standard User Groupware only:
    The programming of the User Groupware is automatically included in your application. The internal component named WDGPU is included in your project. This component contains an analysis as well as all the windows, queries, classes and procedures required to manage the User Groupware. This allows you to customize all the windows used by the User Groupware.
The option "Apply project skin template to non-customized windows at runtime" applies the skin template of your project to the windows specific to the User Groupware if they have not been customized.
The security options are as follows:
  • Allow opening windows and reports by default: This option allows all users to open windows and reports by default. In this case, simply specify which elements will not be accessible when configuring the rights.
  • Allow editing reports and queries in "Reports and Queries": If this option is checked, the application will use "Reports and Queries" for all the reports and queries.
    Remark: This option is identical to "Enable 'Reports and Queries'", in the "Advanced" tab of the project description.
The option "Automatic login for test mode" allows you to specify the username and password to be used in the "Automated test" mode. This information will be used if an automated test is run on the application.
By default:
  • data files are in English. To use data in French, simply check "Data files in French".
  • User Groupware data files have a specific password. This password is: "PCSGPW2001".
    To change this password, enter the new password in the "Options" tab of the User Groupware description window. Characters are shown as bullets.
    Remark: This password is used when re-indexing or opening data files with WDMAP for example.
For more details, see the online help.

Options specific to the standard User Groupware

If you use the standard User Groupware, the "Files" tab allows you to configure:
  • the type of database used (these options are available in "Automatic start" mode only).
  • the type of authentication:
    • Authentication managed by the WINDEV User Groupware.
    • Authentication from an LDAP directory.
    • Windows authentication.
Database type
In "Standard User Groupware" mode, the User Groupware uses several specific data files. These data files are mainly used to manage users, groups, rights and elements in the application. The standard User Groupware can be used:
  • with HFSQL Classic data files. In this case, you can specify the location of the data files via the "Default directory" link.
  • with HFSQL Client/Server data files. In this case, you can define the parameters for accessing the HFSQL Client/Server database as well as the file directory by selecting "Click here to enter the server parameters".
Type of authentication
The standard User Groupware includes several user authentication modes:
  • Authentication entirely managed by the User Groupware:
    The username and password are saved in the User Groupware data files.
  • Authentication from an LDAP directory or Active Directory:
    If the company of your customer uses an LDAP directory, you can enable the User Groupware on this directory. Simply click the link "Click here to enter the server parameters" to specify the characteristics of the LDAP directory (server, port, base DN, etc.). Therefore, the account and the password in the LDAP directory will be automatically requested to the user. For more details, see the online help.
  • Windows authentication:
    In this case, the username and password correspond to those defined for Windows.
    Remark: You can also use a unique authentication. In this case, the username and password will be requested only once per session.
Depending on the option chosen, additional options may be available:
  • Login window only (no management of rights): This option is only available for LDAP and Windows authentication. If this option is checked, no groupware data file will be created. If the application is started in automatic mode, the user will need to log in. If the user is saved in the LDAP directory, the application will start; otherwise, it will be closed. A supervisor cannot configure the rights on the windows. If this option is not checked, only the users in the LDAP directory will be able to log in. You can set the rights on the windows.
  • Single authentication (SSO): This option allows you to enter the password only once per Windows session.
The "OAuth" 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).

Options specific to the BaaS User Groupware

When using a BaaS User Groupware, the "BaaS" and "Email" tabs allow defining specific options.
The "BaaS" tab allows you to define:
  • the location of the User Groupware application server. You can select a PCSCloud platform or a Network or Internet server,
  • the user account management mode,
  • the URLs of the administration sites.
The "Email" tab allows you to write the messages for registration confirmation or password recovery.

Testing the application (Standard User Groupware)

When an application that uses the standard User Groupware is tested, the first window that appears is the login window (regardless of the first window defined in your application).
A single user is created by default: the supervisor. To log in as supervisor, simply enter the following information in the login window:
  • Name : SUPERVISOR
  • Password: SUPERVISOR
You can test your application, or configure the User Groupware.
Remarks:
  • To set a first window other than the login window in your application, select "Manual start (programmatically)" in the "General" tab of the User Groupware options. Simply use gpwOpen to open the login window.
  • The User Groupware management windows are executed before the project initialization code.
  • The window of your application defined in the project will be opened after the login window (if the user is not the supervisor).
  • In the "Options" tab of the User Groupware configuration window, you can define the username and password to be used for the test mode. The password will no longer be requested when you click GO to test the window or project.

Creating the WINDEV executable

When creating an executable that uses the standard User Groupware ("Generate" option on the "Project" tab), the wizard will show a screen specific to the standard User Groupware.
This allows you to define the location of the User Groupware data files.

Installing an application that uses the standard User Groupware

An application that uses the User Groupware is installed like any other application: on the "Project" tab, in the "Generation" group, click "Setup procedure".
The wizard displays a screen specific to the standard User Groupware to set the location of the User Groupware data files.
Remarks:
  • If the User Groupware data files have been configured for your client, they must be selected when preparing the setup. Therefore, the list of setup files must be customized.
  • If the groupware data files have not been configured, the Supervisor will be the only user in the application the first time it is started.
Tip: If you do not configure the different User Groupware use levels for your clients, we recommend that you provide them with a document listing all the controls used in your windows in order to get an optimized configuration.
Configuring the application that uses the standard User Groupware
When the application is deployed, the standard User Groupware is configured by the application supervisor.
This configuration consists in creating users and groups of users, and granting them specific rights for each control in each window of the application. These rights are used to gray controls, groups of controls or menu options, and to make them visible or invisible.
To configure the standard User Groupware, simply:
  1. Start the application (executable or test from WINDEV) and log in as supervisor:
    • Name : supervisor
    • Password: supervisor
  2. Select "Configure groupware".
  3. The User Groupware management window appears. This window is used to:
    • manage users and groups,
    • manage rights,
    • display statistics,
    • migrate data coming from a User Groupware version 17 and earlier.

Managing users

The user management consists in:
  • creating users,
  • creating groups,
  • associating users with groups.
To create a new user, you must specify:
  • the user's last name.
  • the user's first name.
  • the username (mandatory). This username is the identifier used to log in to the application.
  • the user's password. This password is optional and can be entered by the user the first time they log in (check the corresponding option).
The user can be defined as supervisor of the application.
You can also modify or delete users. When you delete a user, you can delete the entire user or their rights only.
Users can be grouped.
To associate a user with a group, simply drag the user and drop it onto the selected group.
A user can be associated with several groups.
Remarks:
  • It is recommended to change the supervisor's password the first time you use the application.
  • If you use an LDAP directory, you can import the users form the directory to manage their rights.

Managing rights

The supervisor can manage the rights granted to each user (or group of users) on the elements of the project windows.
A specific state can be defined for all the elements of a window associated with a user.
The elements in the windows, internal windows and window templates are as follows:
  • controls.
  • groups of controls.
  • menu options.
The following states are available for each element:
  • Default: the element behavior corresponds to the default behavior, defined in the application.
  • Inactive: the element is displayed but no input can be performed.
  • Grayed: the element is grayed. No input can be performed.
  • Invisible: the element is not displayed.

Displaying statistics

You can get application usage statistics by user for a specific period.

Migrating data

From version 18, the User Groupware has been optimized. The data files used by the User Groupware have changed.
The User Groupware administrator can migrate the existing data to the new format and therefore automatically retrieve the data used in the earlier versions. This migration can be performed regardless of the data format: HFSQL Classic, HFSQL Client/Server or Native Connector.
Tips for an application that uses the User Groupware

Using groups of controls

To simplify the configuration of the groupware management according to the users, it is recommended to use groups of controls.
You can create groups of controls in your windows according to the controls to be displayed for a specific user.
The ability to associate a control with several groups of controls increases the number of possible combinations.
These groups of controls can be created in your application for managing the groupware, no specific programming is required.

Visibility of controls

When developing your application, you can define the visibility options of the elements in your windows:
  • in the element description (7-tab window).
  • through programming (State or Visible properties).
When configuring the User Groupware, the supervisor can define different visibility options. The options defined by the supervisor have priority.
For example, a button is used to make a control active. This control was grayed out by the supervisor. Your code will be ignored and the control will not be active.

Defining rights

To define the rights corresponding to the features of your application, it is recommended to:
  • set the rights according to the application user's requirements before creating the setup procedure. Simply add the groupware data files when you create the application setup.
  • provide a technical documentation that includes the names of controls, groups of controls and options that must be configured according to the usage level defined for the application.
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment

Last update: 09/20/2022

Send a report | Local help