User security level enables creating advanced data level access definition. The definition is based on the specified filter which is applied to the selected data sets Note |
---|
Only users with Domain administrator roles assigned are allowed to create and manage user security levels. |
CREATING USER SECURITY LEVELSOpen the Data sets page from main menu on the top of the screen. - Click "User Security Levels" in the left submenu
- Select the option Add new level
Image Added The dialogue window Add user security level allow users define a security level that can be assigned to selected data sets. The following parameters are available: - Name of the security level
- Delimiter that will be used in the query
- Query code for the data filtering
- Applied columns to which the security levels will be applied to (multiple columns can be added)
DEFINING QUERY CODEThe query is using SQL-like format that will be applied to the selected columns as a filter. The query must apply the following steps: - Start with SELECT
- Main data set is referenced via variable $mainDataset(ID) where ID is the data set ID
- Main data set alias is PT
- Main data set needs to be defined in the first part of join
- Other data sets are referenced via variable $dataset(ID) where ID is the data set ID
- Only data set attributes are allowed for the definition
- Variables can be applied
Image Added QUERY CODE EXAMPLE Code Block |
---|
| SELECT PT.L_COMPANY, PT.L_LEDGER, PT.L_FIELD from $mainDataset(210) PT JOIN $dataset(208) JD1 ON (PT.L_COMPANY= JD1.L_COMPANY AND PT.L_LEDGER=JD1.L_LEDGER AND PT.L_FIELD=JD1.L_FIELD)
JOIN $dataset(209) JD2 ON (PT.L_CODE = JD2.L_CODE AND JD1.L_SHARED_CD = JD2.L_SHARED_CD) where ((JD1.L_USER = '$user(username)') AND (PT.L_COMPANY like '$@reportVariable1')) |
VARIABLESThe following variables are available: - $user(XXX) - will return user profile information
- XXX = username, name, surname, phone, phone2. email, address, office, position, active, locale, timeZone, chartType
- $date(now) - will return the current date
- $@reportVariable - will apply value of the report variable
user variables | report variables |
---|
Image Added | Image Added |
UNION
In case multiple selects are required, use key UNION to join them. APPLYING SECURITY LEVELSOnce a user security level is specified, it can be assigned to a data set. In order to do that, open data set detail and follow the below steps: - Select the sub-menu option User security levels
- Select the option Enable user security level to enable data set filtering based on the user security level
- Select option Add existing level to apply an existing user security level to the data set
- Image Added
- Select the required security level and click add
Image Added Applied user security levels are displayed on the user security level screen: Image Added New levels can be added by using the option Add existing level. Selected user security levels can be unassigned by using X button.
|