Changeset 6368

Show
Ignore:
Timestamp:
07/01/08 04:26:06 (5 months ago)
Author:
flynd
Message:

Daemon users no longer return true when checking membership in user group 0 so we need to handle All users group separately.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/mainwin.cpp

    r6367 r6368  
    15151515        } 
    15161516      } 
    1517       else if (u->GetInGroup(m_nGroupType, m_nCurrentGroup)) 
     1517      else if ((m_nGroupType == GROUPS_USER && m_nCurrentGroup == 0) || 
     1518          u->GetInGroup(m_nGroupType, m_nCurrentGroup)) 
    15181519      { 
    15191520        // Update this user if they are in the current group 
     
    16601661      { 
    16611662 
    1662         if (u->GetInGroup(m_nGroupType, m_nCurrentGroup) && show_user(u) ) 
    1663           (void) new CUserViewItem(u, userView); 
     1663        if ((m_nGroupType == GROUPS_USER && m_nCurrentGroup == 0) || 
     1664            u->GetInGroup(m_nGroupType, m_nCurrentGroup)) 
     1665          if (show_user(u)) 
     1666            (void) new CUserViewItem(u, userView); 
    16641667      } 
    16651668      // as we intercept the user's addition, we set it our default codec 
     
    18201823  FOR_EACH_USER_START(LOCK_R) 
    18211824  { 
    1822     // Only show users on the current group and not on the ignore list 
    1823     if (!doGroupView && (!pUser->GetInGroup(m_nGroupType, m_nCurrentGroup) || 
    1824       (pUser->IgnoreList() && m_nGroupType != GROUPS_SYSTEM && m_nCurrentGroup != GROUP_IGNORE_LIST) )) 
     1825    if (pUser->IgnoreList() && m_nGroupType != GROUPS_SYSTEM && m_nCurrentGroup != GROUP_IGNORE_LIST) 
    18251826      FOR_EACH_USER_CONTINUE 
    18261827 
     
    18391840    } 
    18401841    else 
    1841       // Add the user to the list 
    1842       (void) new CUserViewItem(pUser, userView); 
     1842    { 
     1843      if ((m_nGroupType == GROUPS_USER && m_nCurrentGroup == 0) || 
     1844          pUser->GetInGroup(m_nGroupType, m_nCurrentGroup)) 
     1845        // Add the user to the list 
     1846        (void) new CUserViewItem(pUser, userView); 
     1847    } 
    18431848  } 
    18441849  FOR_EACH_USER_END