Цитата:
Сообщение от
em#
The table we want to allow permissions - tmpInventTransWMS - has a Security key on SYS layer. So, what security setup needs to be done for a particular user group to avoid this error? If temp tables have Security keys on SYS layer it is possible that there’s a way to manage them?
You can modify the table and clear its SecurityKey property. Or as you've mentioned you can enable access to the corresponding SecurityKey and disable access to other affected "persistent" tables on a per-table basis.
Цитата:
Сообщение от
em#
We can enable access to the temp table by setting access for the Security key the table is attached (in particularly for InventTables key), but it will enable some extra permissions to the user group.
Build CrossReferencies and look where a particular security key is used. As to the InventTables key, it seems that the only extra permission it gives (that cannot be disabled) is access to some other temporary tables from Invent and WMS modules. Also note that if a table has a ConfigKey attached and that ConfigKey is disabled then the table also becomes temporary despite its Temporary property value.
PS. Here's a sample job to find other temporary tables with SecurityKey set
X++:
Dictionary dict = new Dictionary();
DictTable dictTbl;
Counter n;
;
for (n = 1; n <= dict.tableCnt(); n++)
{
dictTbl = new DictTable( dict.tableCnt2Id( n ) );
if (dictTbl && dictTbl.isTmp() && dictTbl.securityKeyId())
{
if (dictTbl.configurationKeyId() && !isConfigurationKeyEnabled( dictTbl.configurationKeyId() ))
continue; // table is temporarty 'coz the corresponding configKey is disabled
info( strfmt( @"Temporary table %1 has securityKey: %2", dictTbl.name(), securitykeyid2name( dictTbl.securityKeyId() ) ) );
}
}