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


Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to