Loading...
Searching...
No Matches
getdata.test.2.sas File Reference

testing that selectbox (cell dropdown) values respect Row Level Security More...

Go to the source code of this file.

Detailed Description

A HARDSELECT / SOFTSELECT rule whose RULE_VALUE is a library.member.column reference has its distinct values read straight from that source table by getdata.sas. If the source table carries Row Level Security rules, the restricted rows must be filtered out of the dropdown too - otherwise values the user is not permitted to see appear in the cell dropdown while the grid itself is correctly filtered.

This test makes the runner a 'regular' (non admin) user and restricts SOME_BESTNUM in MPE_X_TEST to one value selected from the data (the demo data holds random SOME_BESTNUM values, refreshed by testsetup, so the value cannot be hardcoded). The demo data must hold more than one distinct SOME_BESTNUM - true of the SAS-seeded estate, but NOT of the SASjs server mock, which seeds the seven 44 rows only (see the 'distinct_bestnum' precondition assertion below).

Runners whose SAS identity group is the admin group cannot be demoted by editing MPE_GROUPS alone - Row Level Security is skipped for them - so the test reports a skip row instead of running the assertions.

The call passes a filter (PRIMARY_KEY_FIELD < 100) so the whole selection is served - the unfiltered MPE_X_TEST is above the row limit (642 rows against DC_MAXOBS_WEBEDIT:250) and would come back truncated. The limits test (getdata.test.1.sas) covers that truncation separately.

SAS Macros

@sasjslint {"maxLineLength": 81}

Definition in file getdata.test.2.sas.