niota

fascinating. logical.

User Tools

Site Tools


niota-docs:niota_grid_config_rls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
niota-docs:niota_grid_config_rls [2023/10/09 15:27]
admin
niota-docs:niota_grid_config_rls [2025/07/17 14:11] (current)
Line 9: Line 9:
 **Tokens in the meta db tables:** **Tokens in the meta db tables:**
  
-et_security_token [tokenname, description,​ token_type, ind_active]+//et_security_token// [tokenname, description,​ token_type, ind_active]
  
 **Token assignment with user-groups** **Token assignment with user-groups**
Line 15: Line 15:
 Note: token values are defined in this table. Note: token values are defined in this table.
  
-et_usergroup_token [usergroupname,​ tokenname, tokenvalue, description,​ ind_active]+//et_usergroup_token// [usergroupname,​ tokenname, tokenvalue, description,​ ind_active]
  
 **Token assignment with catalog objects** **Token assignment with catalog objects**
  
-et_catalog_object_column_prop[catalog_id,​ column_name,​ ..., token_name_rls,​ ind_active_rlstoken]+//et_catalog_object_column_prop// [catalog_id,​ column_name,​ ..., token_name_rls,​ ind_active_rlstoken]
  
  
Line 28: Line 28:
 | COUNTRY ​       | country RLS   | 0                    | 1              | | COUNTRY ​       | country RLS   | 0                    | 1              |
  
 +Value token_type = 0 stands for RLS token type.
  
 et_usergroup_token ​ et_usergroup_token ​
 ^ usergroupname ​  ^ tokenname ​        ^ tokenvalue ​      ^ description ​                       ^ ind_active ​    ^ ^ usergroupname ​  ^ tokenname ​        ^ tokenvalue ​      ^ description ​                       ^ ind_active ​    ^
 | my-group ​      | COUNTRY ​           | AU                | string definition ​                | 1              | | my-group ​      | COUNTRY ​           | AU                | string definition ​                | 1              |
 +| my-group ​      | COUNTRY ​           | HU                | string definition ​                | 1              |
 | my-group ​      | ITEMID ​            | (1234) ​           | numeric definition ​               | 1              | | my-group ​      | ITEMID ​            | (1234) ​           | numeric definition ​               | 1              |
 | my-group ​      | NUMBERASSTR ​       | 1234              | number will be treated as string ​ | 1              | | my-group ​      | NUMBERASSTR ​       | 1234              | number will be treated as string ​ | 1              |
Line 42: Line 44:
 Configuration upwards leads to a SELECT stmt like this if the user is part of //​my-group//:​ Configuration upwards leads to a SELECT stmt like this if the user is part of //​my-group//:​
  
-SELECT country_code,​ ... FROM <db objet of catalog id 1000> WHERE **(country_code ​AU)** ...;+SELECT country_code,​ ... FROM <db objet of catalog id 1000> WHERE **(country_code ​in ('AU', '​HU'​))** ...;
  
 Sample stmt with tokens COUNTRY and ITEMID applied: Sample stmt with tokens COUNTRY and ITEMID applied:
  
-SELECT country_code,​ item_id, ... FROM <db objet of catalog id 1000> WHERE **%%(%%(country_code ​'​AU'​) AND (item_id = 1234)%%)%%** ...;+SELECT country_code,​ item_id, ... FROM <db objet of catalog id 1000> WHERE **%%(%%(country_code ​in('​AU'​)) AND (item_id = 1234)%%)%%** ...;
  
niota-docs/niota_grid_config_rls.1696858035.txt.gz · Last modified: 2025/07/17 14:11 (external edit)