PANTHEON™ Help

 Категории
 Главна страна - Добре дојдовте во помош за PANTHEON
[Collapse]PANTHEON
 [Collapse]PANTHEON упатства
  [Expand]Водич за PANTHEON Farming
  [Expand]Водич за Datalab PANTHEON™
  [Expand]Водич за PANTHEON Ретал
  [Expand]Водич за PANTHEON Вет
 [Collapse]PANTHEON кориснички прирачници
  [Expand]Кориснички прирачник Datalab PANTHEON™
  [Expand]Корисничко упатство за PANTHEON Ретал
  [Expand]Корисничко упатство за PANTHEON Vet
  [Expand]Корисничко упатство за ПАНТЕОН Земјоделство
[Collapse]PANTHEON Web
 [Collapse]Водич за PANTHEON Web
  [Expand]Водич за PANTHEON Web Light
  [Expand]Водич за PANTHEON Chronos Mini
  [Expand]Водич за PANTHEON Web Terminal
  [Expand]Водич за PANTHEON Web Legal
  [Expand]Архива на стари производи
 [Collapse]Кориснички прирачник за PANTHEON Web
  [Expand]Најава во PANTHEON Web
  [Expand]Како да започнете со PANTHEON Web
  [Expand]Кориснички прирачник за PANTHEON Web Light
  [Expand]Кориснички прирачник за PANTHEON Web Terminal
  [Expand]Кориснички прирачник за PANTHEON Web Legal
  [Expand]Стара архивa на производи
[Collapse]PANTHEON Гранула
 [Collapse]Водич за PANTHEON Гранули
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и задачи
  [Expand]Гранула Контролна табла
  [Expand]Гранула B2B нарачки
  [Expand]Гранула Сервис на терен
  [Expand]Инвентаризација на фиксни средства
  [Expand]Гранула Попис на магацини
 [Collapse]Кориснички прирачник за PANTHEON Гранули
   Започнување, Pantheon гранули
   Користење на PANTHEON Гранули во фиктивната компанија Текта
  [Expand]Гранули и активација
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и Задачи
  [Expand]Гранула Б2Б нарачки
  [Expand]Гранула Контролна табла
  [Expand]Гранула Сервис на терен
  [Expand]Инвентаризација на фиксни средства
   PANTHEON Гранула - FAQ
  [Expand]Гранула Попис на магацин
   Архива
[Expand]Кориснички сервер

Load Time: 500,0004 ms
"
  6613 | 1 | |
Label


ARES - RLS Compatibility Mode

              

 

Code that must run without a security context of authorizations needs impersonation. Several function and properties are available for impersonation.

 

When an EXECUTE AS statement is run, the execution context of the session is switched to the specified login or user name. After the context switch, permissions are checked against the login and user security tokens for the specified account instead of the account calling the EXECUTE AS statement.

 

Check the following code:

Select USER_NAME()

execute as user = 'RLS_ALL' 

Select USER_NAME()

revert

Select USER_NAME()

 

Result:

 

Warning

Revert must be called! The user or login account is impersonated for the duration of the session or module execution. Afterwards, the context switch is reverted.

 

Functions and properties, see Ares example: EX66716 - ARES - RLS Compatibility Mode

 

Warning

All functions and methods modify code only when IsRLS = True
 

 

The same code can be used on RLS and non-RLS databases.

  • IsRLS: returns True if RLS is enabled on database.
    check: select * from [dbo].[fPA_RLSEnabled]()
  • Function SQLToSQLRLSAll(ASQL: String): String;
    Converts SQL
  • ARES.ExecuteStep_RLS_ALL(3);
    Code in step 3 will be executed using SQLToSQLRLSAll.
  • ExecuteAsUser_RLS_ALLSQL
    Use in try-finally statements.
    • ExecuteAsUser_RLS_ALLSQL(True): execute as user = 'RLS_ALL' statement is run
    • ExecuteAsUser_RLS_ALLSQL(False): revert statement is run

  • Property TdlDataset.ExceuteAs_RLS_ALL := True;
    Code TdlDataset.SQL.Text will be executed using SQLToSQLRLSAll.

 

 

Related topics:

  Row Level Security

  How RLS works in practice

  Upgrade

  Database

 Code changes

 

  

     


Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!