Scénario de test & Cas d'usage
Management of access rights and data security.
Discover all actions of accessControlSetup the Caslib, ensuring the specific table 'Audit_Log' does NOT exist yet.
| 1 | |
| 2 | PROC CAS; |
| 3 | caslib audit_lib path='/tmp/audit_lib' dataSource={srcType='path'} |
| 4 | SESSION=true; |
| 5 | TABLE.dropTable / caslib='audit_lib' TABLE='Audit_Log' quiet=true; |
| 6 | |
| 7 | RUN; |
| 8 |
| 1 | PROC CAS; ACCESSCONTROL.startTransaction; RUN; |
| 1 | |
| 2 | PROC CAS; |
| 3 | ACCESSCONTROL.checkOutObject / checkoutParent=TRUE, objectSelector={objType='TABLE', caslib='audit_lib', TABLE='Audit_Log'}; |
| 4 | |
| 5 | RUN; |
| 6 |
| 1 | |
| 2 | PROC CAS; |
| 3 | datastep.runCode / code=' |
| 4 | data audit_lib.Audit_Log; |
| 5 | Timestamp=datetime(); |
| 6 | |
| 7 | run; |
| 8 | '; |
| 9 | ACCESSCONTROL.commitTransaction; |
| 10 | |
| 11 | RUN; |
| 12 |
The system detects the absence of 'Audit_Log' and automatically locks the 'audit_lib' Caslib instead. The table is then created safely within the locked environment.