[CalendarServer-changes] [8866] CalendarServer/trunk/calendarserver/tools/shell/vfs.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 14 12:15:38 PDT 2012


Revision: 8866
          http://trac.macosforge.org/projects/calendarserver/changeset/8866
Author:   wsanchez at apple.com
Date:     2012-03-14 12:15:37 -0700 (Wed, 14 Mar 2012)
Log Message:
-----------
Add groups to principal info

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/shell/vfs.py

Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-03-14 07:18:02 UTC (rev 8865)
+++ CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-03-14 19:15:37 UTC (rev 8866)
@@ -301,6 +301,10 @@
         result.append("Principal home for UID: %s\n" % (self.uid,))
 
         if self.record is not None:
+            #
+            # Basic record info
+            #
+
             rows = []
 
             def add(name, value):
@@ -334,6 +338,18 @@
                 result.append("Directory Record:")
                 result.append(tableString(rows, header=("Name", "Value")))
 
+            #
+            # Group memberships
+            #
+            rows = []
+
+            for group in self.record.groups():
+                rows.append((group.uid, group.shortNames[0], group.fullName))
+
+            if rows:
+                result.append("Group Memberships:")
+                result.append(tableString(rows, header=("UID", "Short Name", "Full Name")))
+
         return "\n".join(result)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120314/164b8201/attachment.html>


More information about the calendarserver-changes mailing list