Somehow, I tried using SysSecurity, not SecurityKeySet and it work very well. I
include the source code in case any of you will need it. Please enjoy.
static void SWASecurity2(Args _args)
{
SecurityKeySet swSecurityKeySet;
SWAClassTest a;
;
swSecurityKeySet = SysSecurity::constructSecurityKeySet();
swSecurityKeySet.loadUserRights('aa','com'); // 'admin','dat'
print swSecurityKeySet.access(SecurityKeyNum(Cust)) > AccessType::NoAccess;
pause;
}
Sonny Wibawa AdiSonny Wibawa Adi <[EMAIL PROTECTED]> wrote:
Hello, masters,
Does anybody know the use of class SecurityKeySet? I want to use a security checking for the user if the user can access particular menu, or security id. I tried to check using the codes below, but I still cannot use it, because the value is incorrect. dictSecurityKey.rights() always return Delete and swSysSecurity.access(dictSecurityKey.id()) always return NoAccess.
I tried SecurityKeySet::getMenuItemAccess, but it always return Delete.
Any help would be appreciated. Thank you.
Sonny Wibawa Adi
SecurityKeySet swSysSecurity;
UserGroupList userGroupList;
UserInfo userInfo;
DictSecurityKey dictSecurityKey;
Dictionary dict = new Dictionary();
int i;
str name;
;
while select userGroupList
where userGroupList.userId == curuserid()
{
swSysSecurity = new SecurityKeySet();
swSysSecurity.loadGroupRights(userGroupList.groupId, '100');
for (i=dict.securityKeyCnt(); i; i--)
{
dictSecurityKey = new DictSecurityKey(dict.securityKeyCnt2Id(i));
if (!swSysSecurity.disabledByConfigurationKey(dictSecurityKey.id()))
{
name = dictSecurityKey.name();
infolog.add(Exception::Info,strfmt('%5 %6 %1 %2 %3 %4',name,
enum2str(swSysSecurity.access(dictSecurityKey.id())),
dictSecurityKey.id(),
enum2str(dictSecurityKey.rights()),
userGroupList.groupId,
userGroupList.userId
)); }
}
}_____
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
_____
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Yahoo! Groups Sponsor ADVERTISEMENT
Click Here!
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

