[CalendarServer-changes] [13529] twext/trunk/twext/who/opendirectory/_service.py

source_changes at macosforge.org source_changes at macosforge.org
Wed May 21 16:09:17 PDT 2014


Revision: 13529
          http://trac.calendarserver.org//changeset/13529
Author:   sagen at apple.com
Date:     2014-05-21 16:09:17 -0700 (Wed, 21 May 2014)
Log Message:
-----------
UniqueId and PrimaryGroupId values of 99 are convention for "un set"

Modified Paths:
--------------
    twext/trunk/twext/who/opendirectory/_service.py

Modified: twext/trunk/twext/who/opendirectory/_service.py
===================================================================
--- twext/trunk/twext/who/opendirectory/_service.py	2014-05-21 21:27:43 UTC (rev 13528)
+++ twext/trunk/twext/who/opendirectory/_service.py	2014-05-21 23:09:17 UTC (rev 13529)
@@ -586,20 +586,20 @@
         # Record-type specific indicators...
         recType = details.get(ODAttribute.recordType.value, (u"",))[0]
 
-        # ...users with UniqueID <= 500
+        # ...users with UniqueID <= 500 (and is not 99)
         if recType == ODRecordType.user.value:
             uniqueId = int(
                 details.get(ODAttribute.uniqueId.value, (u"0",))[0]
             )
-            if uniqueId <= 500:
+            if uniqueId <= 500 and uniqueId != 99:
                 return True
 
-        # ...groups with PrimaryGroupID <= 500
+        # ...groups with PrimaryGroupID <= 500 (and is not 99)
         elif recType == ODRecordType.group.value:
             primaryGroupId = int(
                 details.get(ODAttribute.primaryGroupId.value, (u"0",))[0]
             )
-            if primaryGroupId <= 500:
+            if primaryGroupId <= 500 and primaryGroupId != 99:
                 return True
 
         # RecordName matches specific prefixes; if *all* RecordName values for
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140521/554f7182/attachment.html>


More information about the calendarserver-changes mailing list