The deploy screen needs to find and test a writeable folder before the control library exists, so these questions cannot be answered by an admin-gated service: %mpeinit() reads &DC_LIBREF..mpe_config, which makedata itself creates. That is why the previous dirlist could not run in the window it existed for. They are answered by the service that already owns that window instead. makedata now requires an ACTION column: MAKEDATA create the configuration tables (what it always did) DIRLIST the folders below PARENT, DEPTH levels deep, MAXOBS capped WRITECHECK does PATH exist, is it a folder, can we write in it so a deployment has one service to run and the same one to remove - makedata already self destructs after a successful run, and now nothing is left behind that can enumerate the filesystem. ACTION is not defaulted: a caller that does not say what it wants is refused rather than having a control library seeded for it. The payloads under deploy/ and the configurator's link are updated in the same change, so the installer and the seeding scripts keep working. The work is in mpe_browse, called from both server and viya makedata: mp_dirlist does the listing (a blank parent is the platform roots), and mp_validatecol(ISPATH) shape checks whatever is submitted. Folders are returned a level at a time so a parent with tens of thousands of subfolders is never transferred in full, and the finite depth is what makes a symlink loop harmless. The body of makedata is now a macro of its own, because the branch cannot be open code - noMacroIfInOpenCode keeps the file loadable on every 9.4 maintenance level. Its four helper macros are unchanged. Input is the adapter table as before, never macro text: a value is refused if it carries a macro trigger, a quote or a statement separator, and only the three known ACTION values are ever put into a macro variable. sas9 is not included: its makedata is the metadata STP driven by the configurator page through URL parameters, not by the adapter, and the sas9 configurator takes a typed path rather than a picker. That is a change of input mechanism, not of this feature, so it is left for its own ticket.
11 lines
144 B
JSON
11 lines
144 B
JSON
{
|
|
"fromjs": [
|
|
{
|
|
"ADMIN": "all-users",
|
|
"DCPATH": "/tmp/dcdata",
|
|
"OUTFMT": "JSON",
|
|
"ACTION": "MAKEDATA"
|
|
}
|
|
]
|
|
}
|