private bool OnFindSystemUserInNetGroupHandler(SystemUserInNetGroupArgs e)
        {
            string sSystemUserName = e.SystemUser.ToUpper();
            string sNetGroupName   = e.NetGroup.ToUpper();

            List <string> oNetGroups = default(List <string>);

            if (!m_oSystemUserNetGroups.ContainsKey(sSystemUserName))
            {
                oNetGroups = ObtainUserGroups(sSystemUserName);

                m_oSystemUserNetGroups[sSystemUserName] = oNetGroups;
            }
            else
            {
                oNetGroups = (List <string>)m_oSystemUserNetGroups [sSystemUserName];
            }

            foreach (string netGroup in oNetGroups)
            {
                if (StringUtil.CompareIgnoreCase(netGroup, sNetGroupName))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 2
0
 private bool OnFindSystemUserInNetGroupHandler(SystemUserInNetGroupArgs e)
 {
     if (OnFindSystemUserInNetGroup != null)
     {
         return(OnFindSystemUserInNetGroup(e));
     }
     else
     {
         return(false);
     }
 }