Цитата:
Сообщение от
em#
My question is if there is a way to enable permissions for Temp tables without modifying the application.
What's the purpose of setting permissions on temporary tables? They're always populated by code, and the originating data is usually taken from "real" tables or somehow produced by the code, so you can always perform an access validation in your code:
X++:
if (isTableUserEnabled( tablenum(CustTable) ))
{
// populate temp table
}
else
{
throw error( "@SYS60037" ); // Access denied
}
Besides, you never know where this or that temp table can be used. If an arbitrary temp table has a suitable set of fields then it's sometimes preferable to use it in your custom form/report then to create a new temp table. E.g. lots of standard reports in the localization for Eastern Europe use just a couple of temporary tables - both in Accounts Payable and Accounts Receivable modules. Obviously in this case it's more flexible and robust to validate access by security keys on menu items.