- This lesson will teach you the following concepts
- 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
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.
|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", then click "Full WEBDEV Site (With pages)".|
Integrating the user groupware
- To include the user groupware in the "Full_WEBDEV_Site" project:
- On the "Project" pane, in the "Project" group, click "User groupware". The window for configuring the user groupware is displayed.
- In the "Integration" pane, select the following options:
- Automatic user groupware.
- Enable the integrated user groupware.
|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.
- Validate. A message is displayed, indicating that a "supervisor" user is created by default.
|A single user exists by default, the supervisor. During the first site start, connect yourself by using the: "supervisor" login and the "supervisor" password.|
- Validate this message. The user groupware in integrated in the project.
|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.
|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.
|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 uses the control template. The controls can be modified.
- To include the connection link:
- Open the "PAGE_List_of_Products" page in the editor.
- Go to the "Project explorer" pane, "Internal components", and 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.
- Then, expand "WEBDEV control templates".
- 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 menu bar.
- The control template is integrated. The "Connection" link appears.
- Let's now run the test of our site:
- Run the project test ( among the quick access buttons).
- The page corresponding to the list of products is displayed.
- Click the "Connection" link. The connection page is displayed.
- Connect yourself as supervisor:
- Login: supervisor
- Password: supervisor
- 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:
- Click the "Groups" tab.
- Click "Add a group". The screen for entering a new group is displayed.
- Type the group name: "Product Management".
- Click on "Save". The "Product Management" group appears in the list of groups defined for the user groupware.
- To create a user:
- Click on the "Users" tab.
- Click on "Add a user". The screen for entering a new user is displayed.
- Type the following information:
- Login: Alison
- First name: Alison
- Select "Force the following password" and enter the password: Alison.
Remark: You can give the user the ability to choose his password during the first connection.
|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.
- 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:
- Select the user named "Alison" in the page.
- Check the box at the beginning of row: the buttons "User groups" and "Delete user" appear.
- Click "User groups".
- In the popup that appears, check "Product Management" then click "Validate".
- The association is performed. The name of the "Alice" user group appears in the lists of users.
We will now define the access rights to the menu for adding a product.
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:
- To prevent all users from accessing the product addition page, select "Visitor (not connected)" (click the check box at the top of row). Each unconnected user is automatically associated with this user.
- Click to set the rights.
- 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:
- 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.
- The names of the different page controls appear on the right.
- For "Sub-menu Option_2", select "Grayed" in the "State" combo box.
- Close the browser.
- We are now going to run the site test.
- Run the project test ( among the quick access buttons).
- By default, the option "ADD A PRODUCT" is grayed.
- Click "Connection" and use the login "Alison" (and the password "Alison"). Validate.
- The option "ADD A PRODUCT" is no longer grayed.
- 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:
- On the "Project" pane, in the "Project" group, click "User groupware".
- In the window that is displayed, in the "Integration" tab, select "No user groupware".
Click [Add] to post a comment