PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WEBDEV 24 feature!
  • This lesson will teach you the following concepts
  • Overview
  • Integrating the user groupware
  • Configuring the user groupware
  • Including the customer section in the site
  • Site test
  • Creating users and groups
  • Defining rights
  • Site test
  • Disabling the management of user groupware
Lesson 5.4. Identifying the user: the user groupware
This lesson will teach you the following concepts
  • What is the user groupware?
  • Integrating the user groupware.
  • Configuring the user groupware.
  • Checking the user groupware.

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
A site can be used by different contributors with different profiles. It is sometimes necessary to define different access levels according to the Web user (customer, salesman, manager for example).
Let's take a simple example: when implementing an e-business site, the site proposes the following features:
  • Price list view,
  • Price list modification,
  • Order entry,
  • Managing customers.
The accesses differ according to the Web user. Some examples:
  • the Web users can see the price list and place orders.
  • the sales people can see the price list, place orders and create new customers.
  • the sales directors have access to all options.
WEBDEV allows you to manage these different access levels via the user groupware.
We are going to include the user groupware in our "Full_WEBDEV_Site" site and to configure it in order to limit the access to the page for adding products.

Answer

If you have not created the pages from the previous lessons, you can follow this lesson by opening a corrected project: on the "Home" pane, in the WEBDEV home page (Ctrl + <), click "Tutorial" and select "Full WEBDEV Site (With pages)".
Integrating the user groupware
  • To include the user groupware in the "Full_WEBDEV_Site" project:
    1. On the "Project" pane, in the "Project" group, click "User groupware". The window for configuring the user groupware is displayed.
    2. In the "Integration" pane, select the following options:
      • Automatic user groupware.
      • Enable the integrated user groupware.

        Note

        When the integrated user groupware is not used, a standard connection page is proposed. If the user types his login and password, he is allowed to access the site.
        When the integrated user groupware is used, a specific control template is made available to the developer. This control template is used to include in the page a link allowing the user to connect. We are going to present this solution in this lesson because it is flexible and it can be easily included.
    3. Validate. A message is displayed, indicating that a "supervisor" user is created by default.

      Note

      A single user exists by default, the supervisor. During the first site start, connect yourself by using the: "supervisor" login and the "supervisor" password.
    4. Validate this message. The user groupware in integrated in the project.

      Note

      In this example, we will keep all default options. Several options can also be configured.
      See User groupware: Options and setting for more details.
Configuring the user groupware
The configuration of user groupware is performed when running the site. This configuration consists in defining the different users as well as their rights on the site pages and controls.

Note

The configuration of users can be performed:
  • when developing the application. The necessary data files (regarding the users and their rights) can be installed with the site.
  • when the site is installed, by the administrator.

Including the customer section in the site

In this example, we are going to include the connection link in the "PAGE_List_of_products" page.
The connection link is supplied in the format of a control template.

Note

A control template is a specific page containing several controls. All types of controls can be found in this page. A control template is a file whose extension is "WDT".
The first benefit of a control template is the reusability. A control template found in a project can be re-used in any project page. The modifications are performed once only in the control template and the modifications are automatically applied by WEBDEV.
The control templates can be overloaded: code can be added, the controls can be moved in the page that is using the control template. The controls can be modified.
  • To include the connection link:
    1. Display the "PAGE_List_of_Products" page in the editor.
    2. In the project explorer, in the "Internal components" folder, expand "WDGPU_WB_CNT". This internal component was included in the project when implementing the integrated groupware. It contains all elements required to its management, especially the control template used to connect.
    3. Then, expand "WEBDEV control templates".
    4. Select the control template named "TPLC_GPU_Connection" and perform a Drag and Drop into the "PAGE_List_of_products" page. Drop the control template above the search control.
    5. The control template is integrated. The "Connection" link appears.

Site test

  • Let's now run the test of our site:
    1. Run the project test ( among the quick access buttons).
    2. The page corresponding to the list of products is displayed.
    3. Click the "Connection" link. The connection page is displayed.
    4. Connect yourself as supervisor:
      • Login: supervisor
      • Password: supervisor
    5. Validate.
    6. The page for groupware configuration is displayed.

Creating users and groups

To configure the user groupware, we are going to create a "Product Management" group. This group will group all users allowed to modify and add products in the site.
Then, we are going to create a user named Alison, associated with the "Product Management" group.
  • To create a new group of users:
    1. Click the "New" button found below the "Groups" area. The screen for entering a new group is displayed.
    2. Type the group name: "Product Management".
    3. Click on "Save". The "Product Management" group appears in the list of groups defined for the user groupware.
  • To create a user:
    1. Click the "New" button found below the "Users" area. The screen for entering a new user is displayed.
    2. Type the following information:
      • Login: Alison
      • First name: Alison
      • User enabled (the user account is automatically enabled in the site and it can be used immediately).
      • Password: Alison. You can give the user the ability to choose his password during the first connection.

        Note

        Information regarding the user:
        • In the information regarding the user, only the login is required.
        • You also have the ability to define that the user is a groupware supervisor. In this case, he will be allowed to modify the users, the groups and the rights.
    3. Click on "Save". The user named "Alison" appears in the list of users defined for the user groupware.
  • To associate the user named "Alison" with the "Product Management" group:
    1. Select the user named "Alison" in the page.
    2. Select the "Product Management" group.
    3. Click the addition arrow: .
    4. The association is performed.

Defining rights

We must now define the access rights to the menu for adding products.
A good practices consists in refusing the default accesses and in giving access to the selected groups only.
  • We are now going to define rights for the unconnected users (which means not identified by the groupware). These rights will be used by default when starting the site, as long as the user is not connected.
  • To define the rights:
    1. Click "Rights management" on the left of the page.
    2. To prevent all users from accessing the page for product addition, select the "Visitor (not connected)" user. Each unconnected user is automatically associated with this user.
    3. Click "Next".
    4. The page that is displayed is used to select each application page, page template or report.
      • 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 site behavior (default) or whether they will be inactive, invisible or grayed.
  • In our case, the "Add a product" link is found in the "PAGETPL_Menu" page template:
    1. Select the "PAGETPL_Menu" page template in the list. The rights defined on the page template will be applied to all pages that use the template.
    2. Click "Next".
    3. The window for configuring rights on the page controls is displayed.
    4. Select the menu option to configure: "Sub-menu Option_2"
    5. Click the "Grayed" button.
    6. Click "Save" to save the modifications.
    7. Close the browser.

Site test

  • We are now going to run the site test.
    1. Run the project test ( among the quick access buttons).
    2. By default, the "Add a product" option is grayed.
    3. Click "Connection" and use the login "Alison" (and the password "Alison"). Validate.
    4. The "Add a product" option is no longer grayed.
    5. Close the browser.
Disabling the management of user groupware
The user groupware will no longer be used in the rest of this tutorial. Therefore, you can disable the management of user rights in this project:
  1. On the "Project" pane, in the "Project" group, click "User groupware".
  2. In the window that is displayed, in the "Integration" tab, select "No user groupware".
  3. Validate.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 24
Comments
Click [Add] to post a comment