Luegisdorf
12/5/2005 9:01:00 AM
Hi Mike
Absolutely great! Works very fine - and it's really easy to use. Thank you
very, very much.
PS: "Grüezi" is only to use like "welcome" and 'Greetz' means just
'greetings'. To say goodby you could use "Tschau", "Salü/Salut", "Adieu" or
"Tschüss" for someone you know personally, the more formerly expressions are
"Auf Wiedersehen" or just "Mit freundlichen Grüssen" ;-)
regards
Patrick
"Mike Frank" wrote:
> You got me interested ;-) Here's how it can be done:
>
> static void CbsSetAccessRights(Args _args)
> {
> SecurityKeySet securityKeySet = new SecurityKeySet();
> UserGroupId userGroupId = 'Dev';
> domainId domainId = 'Admin';
> ;
> // TODO check that userGroup and domain exist
> securityKeySet.loadGroupRights(userGroupId, domainId);
> // TODO check, that the access does not exceed the table's MaxAccessMode
> // (is done in SysSecurityUserGroup)
> securityKeySet.tableAccess(tablenum(InventTable), AccessType::Add);
> // this one writes directly to the AccessRightsList table
> xAccessRightsList::saveSecurityRights(securityKeySet.packTouched(), userGroupId, domainId);
> }
>
> Information was extracted from the listed elements:
> \System Documentation\Classes\SecurityKeySet
> \Classes\SysSecurity
> \Classes\SysSecurityUserGroup
> \Forms\SysUserGroupSecurity
>