New WEBDEV 2024 feature!
Help / WEBDEV Tutorial / Tutorial - User Groupware
  • User login: User Groupware
  • What is the User Groupware?
  • Integrating the User Groupware
  • Opening the example project
  • Integrating the User Groupware into the project
  • Integrating user authentication into the website
  • Configuring the User Groupware
  • Creating users and groups
  • Defining rights
  • Testing the page with a specific user
  • Disabling the User Groupware
  • To sum up

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
What is the User Groupware?
A website can be used by different contributors with different profiles. It is sometimes necessary to define different access levels according to the user (customer, salesman, manager, etc.).
For example:
  • customers can see the price list and place orders.
  • salesmen can see the price list, place orders and create new customers.
  • managers have access to all the options.
WEBDEV allows you to easily manage these access levels via the User Groupware.
We will integrate the User Groupware into the "Full WEBDEV Site" project and configure it.

Integrating the User Groupware

Opening the example project

This tutorial uses the "Full_WEBDEV_Site" project. This website will have a front office and a back office. We will configure the website to limit access to the add products page in the back office. Authentication via the User Groupware will be automatically implemented using a login link.
In WEBDEV, open the "Full_WEBDEV_Site" project:
  1. Go to the WEBDEV home page (Ctrl + <).
  2. Click "Tutorial", then in "Tutorial - Create a WEBDEV website (Back Office and Front Office)", double-click "Full WEBDEV Site - Answers".

Integrating the User Groupware into the project

First of all, to use the User Groupware in a website, you need to integrate it into your project. Follow these steps:
  1. On the "Project" tab, in the "Project" group, click "User Groupware". The configuration window of the current platform opens on the "GPU" tab.
    If you have multiple project configurations, the User Groupware can be configured for just one of them. The User Groupware login prompt will only appear 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 only describe the options used in this tutorial.
  1. In the "General" tab, the "Standard User Groupware" option is selected by default. This option allows authenticating users directly from the website. That is the desired method in this tutorial. We will therefore keep this option.
  2. Select "Manual start via a control template": this option will create a specific Link control. This link will allow users to access pages where authentication is required.
    We will choose this option, since it is easy to use and adapt. For more details on the different options, see User Groupware: Options and settings
  3. Confirm and close the User Groupware settings window.
  4. A message appears indicating that an administrator account will be created the first time the application is run.
    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.
  5. Validate this message.
  6. Validate the project configuration window. The User Groupware has been enabled in the project. Various style errors appear. Let's fix them right away.
  7. First, update the skins used in the project: on the "Project" tab, in the "Project" group, expand "Recompile and synchronize" and select "Update skins".
  8. Then, update the project styles: on the "Project" tab, in the "Project" group, expand "Recompile and synchronize" and select "Update page styles".
  9. Update the templates: on the "Project" tab, in the "Project" group, expand "Recompile and synchronize" and select "Synchronize templates".

Integrating user authentication into the website

Our project now supports the User Groupware, but users must be able to log in. In this example, we will integrate the login link into "PAGE_List_of_products".
The log in link is provided as a control template.
A control template is a specific page containing several controls. A control template can be reused in any page of the project. You only need to make changes once and WEBDEV automatically applies them on all the pages that use the control template.
For more details, see Control template.

Let's integrate the login link into the page:
  1. Open the "PAGE_List_of_products" page in the editor. You can press Ctrl + E and enter the name of the page.
  2. Go to the "Project explorer" pane, "Internal components", and expand "WDGPU_WB_CNT".
    This internal component was included in the project when the User Groupware was enabled. It contains all the necessary elements, especially the control template used to log in.
  3. Then, expand "WEBDEV control templates".
    User Groupware in the 'Project explorer' pane
  4. Select the TPLC_GPU_WB_Login control template and drop it onto PAGE_List_of_products. Drop the control to the right of the Company logo.
    Drag and drop control template
  5. The control template is successfully included. The "Log in" link appears.
Configuring the User Groupware
The User Groupware is configured when running the website. This configuration consists in defining the users and their rights on the pages and controls of the website.
Users can be configured:
  • when developing the application. The necessary data files (regarding the users and their rights) can be installed with the website.
  • when the administrator installs the website.
Let's test our page, which in turn, will allow us to configure users and rights.
  1. Test the page (click Test page in the quick access buttons).
  2. The page with the list of products is displayed.
  3. Click the "Log in" link. The login page is displayed.
  4. Log in as supervisor:
    • Username: supervisor
    • Password: supervisor
  5. Validate.
  6. On the page that appears, select "Configure groupware".
  7. The User Groupware configuration page appears.
    User Groupware test

Creating users and groups

To configure the User Groupware, we are going to create a "Product Management" group. This group will include the users who are allowed to edit and add products in the website.
Then, we will create a user named Alison and associate it with the "Product Management" group.

To create a new group of users:
  1. Click the "Groups" tab.
  2. Click "Add a group". The group creation window appears.
  3. Type the group name: "Product Management".
  4. Click "Save". The "Product Management" group appears in the list of groups defined in the User Groupware.
To create a user:
  1. Click on the "Users" tab.
  2. Click "Add a user". The screen for entering a new user is displayed.
  3. Enter the following information:
    • Username: Alison
    • First name: Alison
    • Select "Force the following password" and enter the password: Alison.
      Remark: You can also let users choose their passwords the first time they log in.
      User information:
      • In the user information, only the username is mandatory.
      • You can also set a user as Groupware supervisor. In this case, the supervisor will be able to modify users, groups and rights.
  4. Click "Save". "Alison" appears in the list of users defined in the User Groupware.
To associate "Alison" with the "Product Management" group:
  1. Select "Alison" in the page.
  2. Check the box at the beginning of the row: the buttons "User groups" and "Delete user" appear.
  3. Click "User groups".
  4. In the popup that appears, check "Product Management" and click "OK".
  5. The association is completed. The name of the group to which "Alison" is associated appears in the list of users.

Defining rights

We will now define the access rights to the menu for adding a product.
It is recommended to refuse default access and allow selected groups only.
We will define the rights for users who haven't logged in (i.e., not identified by the Groupware). These rights will be used by default when the website opens, as long as the user isn't logged in.
Define the rights:
  1. To prevent all users from accessing the page used to add products, select the "Visitor (not connected)" user. Any user who is not logged in is automatically associated with this user.
  2. Click to set the rights.
  3. The page that appears allows you to select each page, page template or report of the application.
    • For each page, page template or report, it is possible to specify whether or not the element will be accessible to the user or group previously selected.
    • For each page or page template, you can define whether the controls will have the behavior defined by the website (default) or whether they will be inactive, invisible or grayed.
In our case, the "Product form" link is in the "PAGETPL_Menu" page template:
  1. Select the "PAGETPL_Menu" page template from the list. The rights defined on the page template will be applied to all the pages that use the template.
  2. The names of the different page controls appear on the right.
  3. For "Menu option OPT_AddProduct", select "Grayed" in the "State" combo box.
  4. Close the browser.

Testing the page with a specific user

We will now test the page.
  1. Click Test page in the quick access buttons.
  2. By default, the "Product form" option is grayed out.
  3. Click "Log in" and enter "Alison" in the username and password fields. Validate.
  4. The "Product form" option is no longer grayed out.
  5. Close the browser.
Disabling the User Groupware
Other tutorials use the "Full_WEBDEV_Site" project, but they do not require you to enable the User Groupware. Let's disable it.
You can disable the management of user rights in this project and remove the control template we used:
  1. On the "Project" tab, in the "Project" group, click "User Groupware".
  2. The platform configuration window appears.
  3. In "User Groupware", click "Change".
  4. In the window that appears, click "Disabled".
  5. Validate.
  6. If necessary, open "PAGE_List_of_products".
  7. Delete the "Log in" control template we added previously.
  8. Save and close the page.
  9. Recompile the project: on the "Project" tab, in the "Project" group, expand "Recompile and synchronize" and select "Recompile project and generate HTML pages".
  10. Go to the "Project explorer" pane, expand "Internal components" and select "WDGPU_WB_CNT". Right-click to open the context menu and select "Remove and delete from disk".
  11. Validate the message that appears.
The User Groupware is removed from the project.
To sum up
We discovered how to set up and use the User Groupware.
We defined users and user groups, as well as their rights.
We have completed this tutorial. Don't forget to close the current project:
  1. On the "Home" tab, in the "General" group, expand "Close" and select "Close project".
  2. Save changes if necessary.
The WEBDEV home page appears.
Table of contents
Minimum version required
  • Version 2024
Click [Add] to post a comment

Last update: 12/15/2023

Send a report | Local help