Use user catalog in sharing presentation and editing
authorMiltiadis Vasilakis <mvasilak@gmail.com>
Fri, 22 Feb 2013 20:24:14 +0000 (22:24 +0200)
committerMiltiadis Vasilakis <mvasilak@gmail.com>
Fri, 22 Feb 2013 20:24:14 +0000 (22:24 +0200)
Provide separate input for sharing user and group. Fix bugs.

15 files changed:
pithos-apple-common
pithos-macos.xcodeproj/project.pbxproj
pithos-macos/PithosAccountNode.m
pithos-macos/PithosObjectNode.h
pithos-macos/PithosObjectNode.m
pithos-macos/PithosObjectNodeInfoController.h
pithos-macos/PithosObjectNodeInfoController.m
pithos-macos/PithosObjectNodeInfoController.xib
pithos-macos/PithosPreferencesController.xib
pithos-macos/PithosSubdirNode.h
pithos-macos/PithosSubdirNode.m
pithos-macos/SharingDictionaryTransformer.m [deleted file]
pithos-macos/SharingNameFormatter.m [deleted file]
pithos-macos/SharingUserPermissionTransformer.h [moved from pithos-macos/SharingDictionaryTransformer.h with 90% similarity]
pithos-macos/SharingUserPermissionTransformer.m [moved from pithos-macos/SharingNameFormatter.h with 66% similarity]

index 0be02d2..ca7626d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0be02d23590cf90f1358d9c2029c07a3035edea6
+Subproject commit ca7626d763435ba5416f009de1f9a55dd20eacde
index a2d02d9..c8bbe7d 100644 (file)
@@ -7,6 +7,7 @@
        objects = {
 
 /* Begin PBXBuildFile section */
+               6100FE8A16D7ED3C00D2351A /* SharingUserPermissionTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6100FE8816D7ECAE00D2351A /* SharingUserPermissionTransformer.m */; };
                610DD2F613E6BB2000ED982F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD2F513E6BB2000ED982F /* Cocoa.framework */; };
                610DD30013E6BB2000ED982F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 610DD2FE13E6BB2000ED982F /* InfoPlist.strings */; };
                610DD30313E6BB2000ED982F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD30213E6BB2000ED982F /* main.m */; };
                619B85D513F8077800C9371F /* PithosPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 619B85D313F8077100C9371F /* PithosPreferencesController.m */; };
                619B85D613F8077800C9371F /* PithosPreferencesController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 619B85D413F8077300C9371F /* PithosPreferencesController.xib */; };
                61C24BBB1410D350007004DC /* PublicURLTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C24BBA1410D350007004DC /* PublicURLTransformer.m */; };
-               61C24BBE1410E031007004DC /* SharingDictionaryTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C24BBD1410E031007004DC /* SharingDictionaryTransformer.m */; };
-               61C24BC114110BDB007004DC /* SharingNameFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C24BC014110BDB007004DC /* SharingNameFormatter.m */; };
                61C24BEC14161EC7007004DC /* PithosUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C24BEB14161EC3007004DC /* PithosUtilities.m */; };
                61C65ADF1428C578002597C2 /* CountTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C65ADE1428C578002597C2 /* CountTransformer.m */; };
-               61C65AE31428D41C002597C2 /* PolicyVersioningTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C65AE21428D41C002597C2 /* PolicyVersioningTransformer.m */; };
                61C65AE6142918DD002597C2 /* PithosObjectNodeInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C65AE5142918DD002597C2 /* PithosObjectNodeInfoController.m */; };
                61D83D9F16D03B1900A1F059 /* NSObject+SBJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D83D8716D03B1900A1F059 /* NSObject+SBJson.m */; };
                61D83DA016D03B1900A1F059 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D83D8A16D03B1900A1F059 /* SBJsonParser.m */; };
@@ -88,6 +86,7 @@
                61D83DA816D03B1900A1F059 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D83D9A16D03B1900A1F059 /* SBJsonTokeniser.m */; };
                61D83DA916D03B1900A1F059 /* SBJsonUTF8Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D83D9C16D03B1900A1F059 /* SBJsonUTF8Stream.m */; };
                61D83DAA16D03B1900A1F059 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D83D9E16D03B1900A1F059 /* SBJsonWriter.m */; };
+               61EF84AB16D6A142002B7B88 /* ASIPithosSharingUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 613F5E9916D5979500343069 /* ASIPithosSharingUser.m */; };
                61F040F31448547000A0C788 /* FileMD5Hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 61F040F11448547000A0C788 /* FileMD5Hash.c */; };
                61F04132144DB97200A0C788 /* PithosLocalObjectState.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F040EE144757B500A0C788 /* PithosLocalObjectState.m */; };
                61F04133144DB97600A0C788 /* PithosSyncDaemon.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F040EA144724F500A0C788 /* PithosSyncDaemon.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+               6100FE8716D7ECAE00D2351A /* SharingUserPermissionTransformer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SharingUserPermissionTransformer.h; path = "pithos-macos/SharingUserPermissionTransformer.h"; sourceTree = "<group>"; };
+               6100FE8816D7ECAE00D2351A /* SharingUserPermissionTransformer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SharingUserPermissionTransformer.m; path = "pithos-macos/SharingUserPermissionTransformer.m"; sourceTree = "<group>"; };
                610DD2F113E6BB2000ED982F /* Pithos+.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Pithos+.app"; sourceTree = BUILT_PRODUCTS_DIR; };
                610DD2F513E6BB2000ED982F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
                610DD2F813E6BB2000ED982F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
                6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileSystemBrowserCell.m; path = "pithos-macos/FileSystemBrowserCell.m"; sourceTree = "<group>"; };
                613BA8611461520E00FACAA5 /* NonEmptyStringFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonEmptyStringFormatter.h; path = "pithos-macos/NonEmptyStringFormatter.h"; sourceTree = "<group>"; };
                613BA8621461520E00FACAA5 /* NonEmptyStringFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NonEmptyStringFormatter.m; path = "pithos-macos/NonEmptyStringFormatter.m"; sourceTree = "<group>"; };
+               613F5E9816D5979500343069 /* ASIPithosSharingUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASIPithosSharingUser.h; sourceTree = "<group>"; };
+               613F5E9916D5979500343069 /* ASIPithosSharingUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASIPithosSharingUser.m; sourceTree = "<group>"; };
                614299A714CEF0E7008D973A /* ASIPithos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIPithos.h; sourceTree = "<group>"; };
                614299A814CEF0E7008D973A /* ASIPithos.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIPithos.m; sourceTree = "<group>"; };
                61433BC7141BA1CE00CD978D /* HashMapHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HashMapHash.h; path = "pithos-macos/HashMapHash.h"; sourceTree = "<group>"; };
                619B85D413F8077300C9371F /* PithosPreferencesController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosPreferencesController.xib; sourceTree = "<group>"; };
                61C24BB91410D350007004DC /* PublicURLTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PublicURLTransformer.h; path = "pithos-macos/PublicURLTransformer.h"; sourceTree = "<group>"; };
                61C24BBA1410D350007004DC /* PublicURLTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PublicURLTransformer.m; path = "pithos-macos/PublicURLTransformer.m"; sourceTree = "<group>"; };
-               61C24BBC1410E031007004DC /* SharingDictionaryTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharingDictionaryTransformer.h; path = "pithos-macos/SharingDictionaryTransformer.h"; sourceTree = "<group>"; };
-               61C24BBD1410E031007004DC /* SharingDictionaryTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SharingDictionaryTransformer.m; path = "pithos-macos/SharingDictionaryTransformer.m"; sourceTree = "<group>"; };
-               61C24BBF14110BDB007004DC /* SharingNameFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharingNameFormatter.h; path = "pithos-macos/SharingNameFormatter.h"; sourceTree = "<group>"; };
-               61C24BC014110BDB007004DC /* SharingNameFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SharingNameFormatter.m; path = "pithos-macos/SharingNameFormatter.m"; sourceTree = "<group>"; };
                61C24BEA14161EC0007004DC /* PithosUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosUtilities.h; sourceTree = "<group>"; };
                61C24BEB14161EC3007004DC /* PithosUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosUtilities.m; sourceTree = "<group>"; };
                61C65ADD1428C578002597C2 /* CountTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CountTransformer.h; path = "pithos-macos/CountTransformer.h"; sourceTree = "<group>"; };
                                610DD33413E6BD8B00ED982F /* ASIPithosContainer.m */,
                                610DD33713E6BD8B00ED982F /* ASIPithosObject.h */,
                                610DD33813E6BD8B00ED982F /* ASIPithosObject.m */,
+                               613F5E9816D5979500343069 /* ASIPithosSharingUser.h */,
+                               613F5E9916D5979500343069 /* ASIPithosSharingUser.m */,
                        );
                        name = Pithos;
                        path = "pithos-apple-common/asi-http-request-with-pithos/Classes/Pithos";
                        children = (
                                615A444F140F8A7F00308614 /* MetadataKeyFormatter.h */,
                                615A4450140F8A7F00308614 /* MetadataKeyFormatter.m */,
-                               61C24BBF14110BDB007004DC /* SharingNameFormatter.h */,
-                               61C24BC014110BDB007004DC /* SharingNameFormatter.m */,
                                613629B7143E51E000363787 /* GroupAndGroupMemberFormatter.h */,
                                613629B8143E51E000363787 /* GroupAndGroupMemberFormatter.m */,
                                613BA8611461520E00FACAA5 /* NonEmptyStringFormatter.h */,
                                615A444D140F8A5700308614 /* MetadataKeyTransformer.m */,
                                61C24BB91410D350007004DC /* PublicURLTransformer.h */,
                                61C24BBA1410D350007004DC /* PublicURLTransformer.m */,
-                               61C24BBC1410E031007004DC /* SharingDictionaryTransformer.h */,
-                               61C24BBD1410E031007004DC /* SharingDictionaryTransformer.m */,
+                               6100FE8716D7ECAE00D2351A /* SharingUserPermissionTransformer.h */,
+                               6100FE8816D7ECAE00D2351A /* SharingUserPermissionTransformer.m */,
                                61C65ADD1428C578002597C2 /* CountTransformer.h */,
                                61C65ADE1428C578002597C2 /* CountTransformer.m */,
                                61C65AE11428D41C002597C2 /* PolicyVersioningTransformer.h */,
                                615A444E140F8A5700308614 /* MetadataKeyTransformer.m in Sources */,
                                615A4451140F8A7F00308614 /* MetadataKeyFormatter.m in Sources */,
                                61C24BBB1410D350007004DC /* PublicURLTransformer.m in Sources */,
-                               61C24BBE1410E031007004DC /* SharingDictionaryTransformer.m in Sources */,
-                               61C24BC114110BDB007004DC /* SharingNameFormatter.m in Sources */,
                                61C24BEC14161EC7007004DC /* PithosUtilities.m in Sources */,
                                614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */,
                                61433BC9141BA1CE00CD978D /* HashMapHash.m in Sources */,
                                611405D01428BEC000637170 /* PithosContainerNodeInfoController.m in Sources */,
                                61C65ADF1428C578002597C2 /* CountTransformer.m in Sources */,
-                               61C65AE31428D41C002597C2 /* PolicyVersioningTransformer.m in Sources */,
                                61C65AE6142918DD002597C2 /* PithosObjectNodeInfoController.m in Sources */,
                                6152D08C143200CC00803874 /* PithosSharingAccountsNode.m in Sources */,
                                6152D092143334CC00803874 /* AllowedToBoolTransformer.m in Sources */,
                                61D83DA816D03B1900A1F059 /* SBJsonTokeniser.m in Sources */,
                                61D83DA916D03B1900A1F059 /* SBJsonUTF8Stream.m in Sources */,
                                61D83DAA16D03B1900A1F059 /* SBJsonWriter.m in Sources */,
+                               61EF84AB16D6A142002B7B88 /* ASIPithosSharingUser.m in Sources */,
+                               6100FE8A16D7ED3C00D2351A /* SharingUserPermissionTransformer.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index ee1ded1..f5768d4 100644 (file)
@@ -73,6 +73,37 @@ static NSImage *sharedIcon = nil;
 }
 
 #pragma mark -
+#pragma mark Internal
+
+- (void)updateGroups {
+    if (!pithosAccount) {
+        self.translatedGroups = [NSMutableDictionary dictionary];
+    } else if (pithosAccountManager) {
+        NSMutableSet *UUIDs = [NSMutableSet set];
+        for (NSString *groupName in pithosAccount.groups) {
+            [UUIDs addObjectsFromArray:[pithosAccount.groups objectForKey:groupName]];
+        }
+        [UUIDs removeObject:@""];
+        [UUIDs removeObject:@"*"];
+        if (UUIDs.count) {
+            [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[UUIDs allObjects]];
+        }
+        
+        NSMutableDictionary *newTranslatedGroups = [NSMutableDictionary dictionaryWithCapacity:pithosAccount.groups.count];
+        for (NSString *groupName in pithosAccount.groups) {
+            NSMutableArray *groupUsers = [NSMutableArray array];
+            for (NSString *UUID in [pithosAccount.groups objectForKey:groupName]) {
+                [groupUsers addObject:[pithosAccountManager displaynameForUUID:UUID safe:YES]];
+            }
+            [newTranslatedGroups setObject:groupUsers forKey:groupName];
+        }
+        self.translatedGroups = newTranslatedGroups;
+    } else {
+        self.translatedGroups = [pithosAccount.groups copy];
+    }
+}
+
+#pragma mark -
 #pragma mark Properties
 
 - (void)setPithos:(ASIPithos *)aPithos {
@@ -90,32 +121,9 @@ static NSImage *sharedIcon = nil;
 }
 
 - (void)setPithosAccount:(ASIPithosAccount *)aPithosAccount {
-    if (!aPithosAccount) {
+    if (![pithosAccount isEqualTo:aPithosAccount]) {
         pithosAccount = aPithosAccount;
-        self.translatedGroups = [NSMutableDictionary dictionary];
-    } else if (![aPithosAccount isEqualTo:pithosAccount]) {
-        pithosAccount = aPithosAccount;
-        if (pithosAccountManager) {
-            NSMutableArray *UUIDs = [NSMutableArray array];
-            for (NSString *groupName in pithosAccount.groups) {
-                [UUIDs addObjectsFromArray:[pithosAccount.groups objectForKey:groupName]];
-            }
-            if (UUIDs.count) {
-                [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:UUIDs];
-            }
-            
-            NSMutableDictionary *newTranslatedGroups = [NSMutableDictionary dictionaryWithCapacity:pithosAccount.groups.count];
-            for (NSString *groupName in pithosAccount.groups) {
-                NSMutableArray *groupUsers = [NSMutableArray array];
-                for (NSString *UUID in [pithosAccount.groups objectForKey:groupName]) {
-                    [groupUsers addObject:[pithosAccountManager displaynameForUUID:UUID safe:YES]];
-                }
-                [newTranslatedGroups setObject:groupUsers forKey:groupName];
-            }
-            self.translatedGroups = newTranslatedGroups;
-        } else {
-            self.translatedGroups = [pithosAccount.groups copy];
-        }
+        [self updateGroups];
     }
 }
 
@@ -418,7 +426,7 @@ static NSImage *sharedIcon = nil;
                                 }
                             }
                             if (!inexistentGroupUsers.count) {
-                                // create groups
+                                // Create groups.
                                 for (NSString *groupName in translatedGroups) {
                                     NSMutableArray *groupUsers = [NSMutableArray array];
                                     for (NSString *groupUser in [translatedGroups objectForKey:groupName]) {
@@ -461,7 +469,14 @@ static NSImage *sharedIcon = nil;
                             }
                         }
                     } else {
-                        [groups setObject:[NSArray arrayWithObject:@""] forKey:@"group"];
+                        for (NSString *groupName in translatedGroups) {
+                            if ([[translatedGroups objectForKey:groupName] containsObject:@"*"]) {
+                                [groups setObject:[NSMutableArray arrayWithObject:@"*"] forKey:groupName];
+                            }
+                        }
+                        if (!groups.count) {
+                            [groups setObject:[NSArray arrayWithObject:@""] forKey:@"group"];
+                        }
                     }
                 } else {
                     [groups addEntriesFromDictionary:translatedGroups];
index f19321e..024b0ca 100644 (file)
@@ -53,6 +53,7 @@
     
     BOOL isPublic;
     NSString *translatedModifiedBy;
+    NSMutableArray *translatedPermissions;
 }
 
 - (id)initWithPithos:(ASIPithos *)aPithos 
@@ -65,6 +66,7 @@
 @property (nonatomic, strong) NSArray *versions;
 @property (nonatomic, assign) BOOL isPublic;
 @property (nonatomic, strong) NSString *translatedModifiedBy;
+@property (nonatomic, strong) NSMutableArray *translatedPermissions;
 
 - (void)applyInfo;
 - (void)refreshInfo;
index 5407694..a0d0d97 100644 (file)
@@ -41,6 +41,7 @@
 #import "ASIPithosObjectRequest.h"
 #import "ASIPithosContainer.h"
 #import "ASIPithosObject.h"
+#import "ASIPithosSharingUser.h"
 #import "ASIDownloadCache.h"
 #import "PithosAccount.h"
 #import "PithosUtilities.h"
@@ -48,7 +49,7 @@
 
 @implementation PithosObjectNode
 @synthesize pithos, pithosContainer, pithosObject, versions;
-@synthesize isPublic, translatedModifiedBy;
+@synthesize isPublic, translatedModifiedBy, translatedPermissions;
 
 #pragma mark -
 #pragma mark Object Lifecycle
 - (void)updateModifiedBy {
     if (!pithosObject.modifiedBy) {
         self.translatedModifiedBy = nil;
-    } else {
-        if (pithosAccountManager) {
-            NSString *displayname = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:NO];
-            if (displayname) {
-                self.translatedModifiedBy = displayname;
-            } else {
-                [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:pithosObject.modifiedBy]];
-                self.translatedModifiedBy = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:YES];
-            }
+    } else if (pithosAccountManager) {
+        NSString *displayname = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:NO];
+        if (displayname) {
+            self.translatedModifiedBy = displayname;
         } else {
-            self.translatedModifiedBy = [pithosObject.modifiedBy copy];
+            [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:pithosObject.modifiedBy]];
+            self.translatedModifiedBy = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:YES];
         }
+    } else {
+        self.translatedModifiedBy = [pithosObject.modifiedBy copy];
+    }
+}
+
+- (void)updatePermissions {
+    if (!pithosObject) {
+        self.translatedPermissions = [NSMutableArray array];
+    } else if (pithosAccountManager) {
+        NSMutableSet *UUIDs = [NSMutableSet set];
+        for (ASIPithosSharingUser *sharingUser in pithosObject.permissions) {
+            [UUIDs addObject:sharingUser.name];
+        }
+        [UUIDs removeObject:@""];
+        [UUIDs removeObject:@"*"];
+        if (UUIDs.count) {
+            [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[UUIDs allObjects]];
+        }
+        
+        NSMutableArray *newTranslatedPermissions = [NSMutableArray arrayWithCapacity:pithosObject.permissions.count];
+        for (ASIPithosSharingUser *sharingUser in pithosObject.permissions) {
+            ASIPithosSharingUser *translatedSharingUser = [sharingUser copy];
+            translatedSharingUser.name = [pithosAccountManager displaynameForUUID:translatedSharingUser.name safe:YES];
+            [newTranslatedPermissions addObject:translatedSharingUser];
+        }
+        self.translatedPermissions = newTranslatedPermissions;
+    } else {
+        self.translatedPermissions = [NSMutableArray arrayWithArray:[pithosObject.permissions copy]];
     }
 }
 
 - (void)setPithosObject:(ASIPithosObject *)aPithosObject {
     if (![pithosObject isEqualTo:aPithosObject]) {
         pithosObject = aPithosObject;
+        [self updateModifiedBy];
+        [self updatePermissions];
     }
-    [self updateModifiedBy];
     self.isPublic = (pithosObject.publicURI != nil);
     // Refresh browser if the object is in my shared and is no longer shared
     if (shared && !pithosObject.sharing)
             self.pithosObject.sharing = aPithosObject.sharing;
             self.pithosObject.publicURI = aPithosObject.publicURI;
             self.pithosObject = pithosObject;
+            [self updatePermissions];
         } else {
             [self updateModifiedBy];
         }
         if (applyMetadataObjectRequest == nil) {
             [[pithosNodeInfoController window] makeFirstResponder:nil];
             if (sharingAccount) {
-                applyMetadataObjectRequest = [ASIPithosObjectRequest updateObjectMetadataRequestWithPithos:pithos 
-                                                                                              containerName:pithosContainer.name 
-                                                                                                 objectName:pithosObject.name 
-                                                                                            contentEncoding:nil 
-                                                                                         contentDisposition:nil 
-                                                                                                   manifest:nil 
-                                                                                                    sharing:nil
-                                                                                                   isPublic:(isPublic ? ASIPithosObjectRequestPublicTrue : ASIPithosObjectRequestPublicFalse) 
-                                                                                                   metadata:pithosObject.metadata
-                                                                                                     update:NO];
+                applyMetadataObjectRequest = [ASIPithosObjectRequest updateObjectMetadataRequestWithPithos:pithos
+                                                                                             containerName:pithosContainer.name
+                                                                                                objectName:pithosObject.name
+                                                                                           contentEncoding:nil
+                                                                                        contentDisposition:nil
+                                                                                                  manifest:nil
+                                                                                                   sharing:nil
+                                                                                                  isPublic:(isPublic ? ASIPithosObjectRequestPublicTrue : ASIPithosObjectRequestPublicFalse)
+                                                                                                  metadata:pithosObject.metadata
+                                                                                                    update:NO];
                 [applyMetadataObjectRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
             } else {
+                NSMutableArray *permissions = [NSMutableArray array];
+                if (translatedPermissions.count) {
+                    for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                        if (translatedsSharingUser.group.length &&
+                            [translatedsSharingUser.group rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" -_~,;"]].location != NSNotFound) {
+                            NSAlert *alert = [[NSAlert alloc] init];
+                            [alert setMessageText:@"Invalid Input"];
+                            [alert setInformativeText:@"Group names cannot contain ' ', '-', '_', '~', ',' or ';'."];
+                            [alert addButtonWithTitle:@"OK"];
+                            [alert runModal];
+                            return;
+                        }
+                    }
+                    if (pithosAccountManager) {
+                        NSMutableSet *allUsers = [NSMutableSet set];
+                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                            if (translatedsSharingUser.name.length) {
+                                [allUsers addObject:translatedsSharingUser.name];
+                            }
+                        }
+                        [allUsers removeObject:@""];
+                        [allUsers removeObject:@"*"];
+                        if (allUsers.count) {
+                            ASIPithosRequest *userCatalogRequest = [pithosAccountManager updateUserCatalogForForDisplaynames:[allUsers allObjects]
+                                                                                                                       UUIDs:nil];
+                            if (userCatalogRequest.error || ((userCatalogRequest.responseStatusCode != 200) && (userCatalogRequest.responseStatusCode != 404))) {
+                                return;
+                            } else if (userCatalogRequest.responseStatusCode == 200) {
+                                // Check if all users exist.
+                                NSDictionary *displaynameCatalog = [userCatalogRequest displaynameCatalog];
+                                NSMutableArray *inexistentUsers = [NSMutableArray array];
+                                for (NSString *user in allUsers) {
+                                    if (![displaynameCatalog objectForKey:user]) {
+                                        [inexistentUsers addObject:user];
+                                    }
+                                }
+                                if (!inexistentUsers.count) {
+                                    // Create permissions.
+                                    for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                        if (translatedsSharingUser.name.length) {
+                                            ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                            if (![sharingUser.name isEqualToString:@"*"]) {
+                                                sharingUser.name = [displaynameCatalog objectForKey:sharingUser.name];
+                                            }
+                                            if (!sharingUser.permission) {
+                                                sharingUser.permission = @"read";
+                                            }
+                                            [permissions addObject:sharingUser];
+                                        }
+                                    }
+                                } else {
+                                    NSAlert *alert = [[NSAlert alloc] init];
+                                    if (inexistentUsers.count == 1) {
+                                        [alert setMessageText:@"Invalid User"];
+                                        [alert setInformativeText:[NSString stringWithFormat:@"User '%@' doesn't exist.", [inexistentUsers objectAtIndex:0]]];
+                                    } else {
+                                        [alert setMessageText:@"Invalid Users"];
+                                        [alert setInformativeText:[NSString stringWithFormat:@"Users '%@' don't exist.", [inexistentUsers componentsJoinedByString:@"', '"]]];
+                                    }
+                                    [alert addButtonWithTitle:@"OK"];
+                                    [alert runModal];
+                                    return;
+                                }
+                            } else {
+                                // 404. Since we don't translate to UUIDs, check for invalid chars.
+                                BOOL valid = YES;
+                                // Create permissions.
+                                for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                    if (translatedsSharingUser.name.length &&
+                                        ([translatedsSharingUser.name rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" ~,;:"]].location != NSNotFound)) {
+                                        valid = NO;
+                                        break;
+                                    }
+                                }
+                                if (valid) {
+                                    for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                        if (translatedsSharingUser.name.length) {
+                                            ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                            if (!sharingUser.permission) {
+                                                sharingUser.permission = @"read";
+                                            }                                            
+                                            [permissions addObject:sharingUser];
+                                        }
+                                    }
+                                } else {
+                                    NSAlert *alert = [[NSAlert alloc] init];
+                                    [alert setMessageText:@"Invalid Input"];
+                                    [alert setInformativeText:@"Users cannot contain ' ', '~', ',', ';' or ':'."];
+                                    [alert addButtonWithTitle:@"OK"];
+                                    [alert runModal];
+                                    return;
+                                }
+                            }
+                        } else {
+                            for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                if ([translatedsSharingUser.name isEqualToString:@"*"]) {
+                                    ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                    if (!sharingUser.permission) {
+                                        sharingUser.permission = @"read";
+                                    }
+                                    [permissions addObject:sharingUser];
+                                }
+                            }
+                        }
+                    } else {
+                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                            if (translatedsSharingUser.name.length) {
+                                ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                if (!sharingUser.permission) {
+                                    sharingUser.permission = @"read";
+                                }
+                                [permissions addObject:sharingUser];
+                            }
+                        }
+                    }
+                }
+                pithosObject.permissions = permissions;
+            
                 applyMetadataObjectRequest = [ASIPithosObjectRequest updateObjectMetadataRequestWithPithos:pithos 
                                                                                               containerName:pithosContainer.name 
                                                                                                  objectName:pithosObject.name 
index 2979dd3..a87f8d7 100644 (file)
@@ -42,7 +42,6 @@
 
 @interface PithosObjectNodeInfoController : PithosNodeInfoController {
     IBOutlet NSDictionaryController *metadataDictionaryController;
-    IBOutlet NSDictionaryController *sharingDictionaryController;
     IBOutlet NSArrayController *versionsArrayController;
     
     IBOutlet InspectorPane *versionsInspectorPane;
index b9e11bc..959247f 100644 (file)
@@ -64,9 +64,7 @@
     
     [metadataDictionaryController setInitialKey:@"key"];
     [metadataDictionaryController setInitialValue:@"value"];
-    [sharingDictionaryController setInitialKey:@"user or user:group"];
-    [sharingDictionaryController setInitialValue:@"read only"];
-    
+
     [[self window] setDelegate:self];
     
     [versionsInspectorPane toggleCollapsedWithAnimation:NO];
index a11ba35..f475f7c 100755 (executable)
@@ -82,7 +82,6 @@
                                                        </object>
                                                        <string key="NSFrame">{{10, 768}, {32, 32}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="56844250"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSImageCell" key="NSCell" id="689737374">
                                                        <int key="NSvFlags">270</int>
                                                        <string key="NSFrame">{{47, 785}, {148, 17}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="335436590"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="974224135">
                                                        <int key="NSvFlags">265</int>
                                                        <string key="NSFrame">{{190, 785}, {68, 17}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="86167308"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="8803370">
                                                        <int key="NSvFlags">268</int>
                                                        <string key="NSFrame">{{47, 765}, {60, 17}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="969715508"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="935332902">
                                                        <int key="NSvFlags">268</int>
                                                        <string key="NSFrame">{{107, 768}, {151, 14}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="368126898"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="1005531049">
                                                                                        <int key="NSvFlags">289</int>
                                                                                        <string key="NSFrame">{{193, 9}, {62, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="230060483"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView"/>
                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                        <object class="NSButtonCell" key="NSCell" id="117901706">
                                                                                        <int key="NSvFlags">292</int>
                                                                                        <string key="NSFrame">{{10, 9}, {62, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="230060483"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="438528257"/>
                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                        <object class="NSButtonCell" key="NSCell" id="1043538309">
                                                                        </object>
                                                                        <string key="NSFrameSize">{265, 34}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="437368623"/>
                                                                        <string key="NSReuseIdentifierKey">_NS:9</string>
                                                                        <string key="NSClassName">NSView</string>
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{128, 9}, {124, 19}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="230060483"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="255083700">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 10}, {114, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="521263215"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="601443016">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{128, 29}, {124, 19}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="863987120"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="789831187">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 31}, {114, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="270900372"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="482032412">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{128, 50}, {124, 19}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="138151415"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="473226597">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 52}, {114, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="1015141391"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="1001933959"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="1029493122">
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{265, 78}</string>
                                                                                        <reference key="NSSuperview" ref="1058234572"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="402680772"/>
                                                                                        <string key="NSClassName">InspectorPaneBody</string>
                                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{3, 2}, {13, 13}}</string>
                                                                                                        <reference key="NSSuperview" ref="686455396"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="598199919"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="439065150">
                                                                                                        <int key="NSvFlags">266</int>
                                                                                                        <string key="NSFrame">{{16, 1}, {242, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="686455396"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="1015141391"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="109106972">
                                                                                        </object>
                                                                                        <string key="NSFrame">{{0, 78}, {265, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="1058234572"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="127566367"/>
                                                                                        <string key="NSClassName">InspectorPaneHead</string>
                                                                                </object>
                                                                        </object>
                                                                        <string key="NSFrame">{{0, 34}, {265, 95}}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="686455396"/>
                                                                        <string key="NSClassName">InspectorPane</string>
                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{27, 8}, {18, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="1058234572"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="725065696">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{10, 8}, {18, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="257358261"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="143417237">
                                                                                                                                        <int key="NSvFlags">4352</int>
                                                                                                                                        <string key="NSFrameSize">{243, 78}</string>
                                                                                                                                        <reference key="NSSuperview" ref="984860460"/>
-                                                                                                                                       <reference key="NSWindow"/>
                                                                                                                                        <reference key="NSNextKeyView" ref="716317492"/>
                                                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                                                        <object class="NSTableHeaderView" key="NSHeaderView" id="743243976">
                                                                                                                                                <int key="NSvFlags">256</int>
                                                                                                                                                <string key="NSFrameSize">{243, 17}</string>
                                                                                                                                                <reference key="NSSuperview" ref="323786210"/>
-                                                                                                                                               <reference key="NSWindow"/>
                                                                                                                                                <reference key="NSNextKeyView" ref="984860460"/>
                                                                                                                                                <reference key="NSTableView" ref="309966560"/>
                                                                                                                                        </object>
                                                                                                                                        <object class="NSMutableArray" key="NSTableColumns">
                                                                                                                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                                                                                                                <object class="NSTableColumn" id="823533572">
-                                                                                                                                                       <double key="NSWidth">101</double>
+                                                                                                                                                       <double key="NSWidth">80</double>
                                                                                                                                                        <double key="NSMinWidth">40</double>
                                                                                                                                                        <double key="NSMaxWidth">1000</double>
                                                                                                                                                        <object class="NSTableHeaderCell" key="NSHeaderCell">
                                                                                                                                                                <int key="NSCellFlags">75628096</int>
                                                                                                                                                                <int key="NSCellFlags2">2048</int>
-                                                                                                                                                               <string key="NSContents">Name</string>
+                                                                                                                                                               <string key="NSContents">User</string>
                                                                                                                                                                <reference key="NSSupport" ref="26"/>
                                                                                                                                                                <object class="NSColor" key="NSBackgroundColor" id="917838038">
                                                                                                                                                                        <int key="NSColorSpace">3</int>
                                                                                                                                                        <bool key="NSIsEditable">YES</bool>
                                                                                                                                                        <reference key="NSTableView" ref="309966560"/>
                                                                                                                                                </object>
+                                                                                                                                               <object class="NSTableColumn" id="42482962">
+                                                                                                                                                       <double key="NSWidth">74</double>
+                                                                                                                                                       <double key="NSMinWidth">10</double>
+                                                                                                                                                       <double key="NSMaxWidth">3.4028234663852886e+38</double>
+                                                                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                                               <int key="NSCellFlags">75628096</int>
+                                                                                                                                                               <int key="NSCellFlags2">2048</int>
+                                                                                                                                                               <string key="NSContents">Group</string>
+                                                                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                                                                               <object class="NSColor" key="NSBackgroundColor">
+                                                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                                                       <string key="NSColorName">headerColor</string>
+                                                                                                                                                                       <reference key="NSColor" ref="392809818"/>
+                                                                                                                                                               </object>
+                                                                                                                                                               <reference key="NSTextColor" ref="328313533"/>
+                                                                                                                                                       </object>
+                                                                                                                                                       <object class="NSTextFieldCell" key="NSDataCell" id="1016520155">
+                                                                                                                                                               <int key="NSCellFlags">337772096</int>
+                                                                                                                                                               <int key="NSCellFlags2">2048</int>
+                                                                                                                                                               <string key="NSContents">Text Cell</string>
+                                                                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                                                                               <reference key="NSControlView" ref="309966560"/>
+                                                                                                                                                               <reference key="NSBackgroundColor" ref="465271680"/>
+                                                                                                                                                               <reference key="NSTextColor" ref="162787576"/>
+                                                                                                                                                       </object>
+                                                                                                                                                       <int key="NSResizingMask">3</int>
+                                                                                                                                                       <bool key="NSIsResizeable">YES</bool>
+                                                                                                                                                       <bool key="NSIsEditable">YES</bool>
+                                                                                                                                                       <reference key="NSTableView" ref="309966560"/>
+                                                                                                                                               </object>
                                                                                                                                                <object class="NSTableColumn" id="926856395">
-                                                                                                                                                       <double key="NSWidth">136</double>
+                                                                                                                                                       <double key="NSWidth">80</double>
                                                                                                                                                        <double key="NSMinWidth">40</double>
                                                                                                                                                        <double key="NSMaxWidth">1000</double>
                                                                                                                                                        <object class="NSTableHeaderCell" key="NSHeaderCell">
                                                                                                                                                                <int key="NSCellFlags">75628096</int>
                                                                                                                                                                <int key="NSCellFlags2">2048</int>
-                                                                                                                                                               <string key="NSContents">Privilege</string>
+                                                                                                                                                               <string key="NSContents">Permission</string>
                                                                                                                                                                <reference key="NSSupport" ref="26"/>
                                                                                                                                                                <reference key="NSBackgroundColor" ref="917838038"/>
                                                                                                                                                                <reference key="NSTextColor" ref="328313533"/>
                                                                                                                                                                <bool key="NSHasVerticalScroller">YES</bool>
                                                                                                                                                                <object class="NSMutableArray" key="NSPopUpListData">
                                                                                                                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                                                                                                                       <string>read only</string>
-                                                                                                                                                                       <string>read/write</string>
+                                                                                                                                                                       <string>Read Only</string>
+                                                                                                                                                                       <string>Read/Write</string>
                                                                                                                                                                </object>
                                                                                                                                                                <object class="NSComboTableView" key="NSTableView" id="240255716">
                                                                                                                                                                        <reference key="NSNextResponder"/>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 17}, {243, 78}}</string>
                                                                                                                        <reference key="NSSuperview" ref="466991564"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="309966560"/>
                                                                                                                        <reference key="NSDocView" ref="309966560"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{224, 17}, {15, 102}}</string>
                                                                                                                        <reference key="NSSuperview" ref="466991564"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="72992134"/>
                                                                                                                        <reference key="NSTarget" ref="466991564"/>
                                                                                                                        <string key="NSAction">_doScroller:</string>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{1, 80}, {243, 15}}</string>
                                                                                                                        <reference key="NSSuperview" ref="466991564"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="678782974"/>
                                                                                                                        <int key="NSsFlags">1</int>
                                                                                                                        <reference key="NSTarget" ref="466991564"/>
                                                                                                                        <string key="NSAction">_doScroller:</string>
-                                                                                                                       <double key="NSPercent">0.94921875</double>
+                                                                                                                       <double key="NSPercent">0.99183673469387756</double>
                                                                                                                </object>
                                                                                                                <object class="NSClipView" id="323786210">
                                                                                                                        <reference key="NSNextResponder" ref="466991564"/>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 0}, {243, 17}}</string>
                                                                                                                        <reference key="NSSuperview" ref="466991564"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="743243976"/>
                                                                                                                        <reference key="NSDocView" ref="743243976"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                        </object>
                                                                                                        <string key="NSFrame">{{10, 28}, {245, 96}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="323786210"/>
                                                                                                        <int key="NSsFlags">133682</int>
                                                                                                        <reference key="NSVScroller" ref="678782974"/>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{83, 130}, {61, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="466991564"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="72629371">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{84, 149}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="819518051"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="675524800">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{12, 149}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="146796395"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="291494547"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="220005737">
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{265, 171}</string>
                                                                                        <reference key="NSSuperview" ref="888863107"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="267700072"/>
                                                                                        <string key="NSClassName">InspectorPaneBody</string>
                                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{3, 2}, {13, 13}}</string>
                                                                                                        <reference key="NSSuperview" ref="529139641"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="251665078"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="264789134">
                                                                                                        <int key="NSvFlags">266</int>
                                                                                                        <string key="NSFrame">{{16, 1}, {242, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="529139641"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="146796395"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="967732680">
                                                                                        </object>
                                                                                        <string key="NSFrame">{{0, 171}, {265, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="888863107"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="1005467771"/>
                                                                                        <string key="NSClassName">InspectorPaneHead</string>
                                                                                </object>
                                                                        </object>
                                                                        <string key="NSFrame">{{0, 129}, {265, 188}}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="529139641"/>
                                                                        <string key="NSClassName">InspectorPane</string>
                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{27, 8}, {18, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="503791488"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="888863107"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="858996111">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{10, 8}, {18, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="503791488"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="927110705"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="740783673">
                                                                                                                                        <int key="NSvFlags">4352</int>
                                                                                                                                        <string key="NSFrameSize">{243, 78}</string>
                                                                                                                                        <reference key="NSSuperview" ref="84392516"/>
-                                                                                                                                       <reference key="NSWindow"/>
                                                                                                                                        <reference key="NSNextKeyView" ref="673955935"/>
                                                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                                                        <object class="NSTableHeaderView" key="NSHeaderView" id="252866414">
                                                                                                                                                <int key="NSvFlags">256</int>
                                                                                                                                                <string key="NSFrameSize">{243, 17}</string>
                                                                                                                                                <reference key="NSSuperview" ref="267706067"/>
-                                                                                                                                               <reference key="NSWindow"/>
                                                                                                                                                <reference key="NSNextKeyView" ref="84392516"/>
                                                                                                                                                <reference key="NSTableView" ref="341749777"/>
                                                                                                                                        </object>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 17}, {243, 78}}</string>
                                                                                                                        <reference key="NSSuperview" ref="120910671"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="341749777"/>
                                                                                                                        <reference key="NSDocView" ref="341749777"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{224, 17}, {15, 102}}</string>
                                                                                                                        <reference key="NSSuperview" ref="120910671"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="734696631"/>
                                                                                                                        <reference key="NSTarget" ref="120910671"/>
                                                                                                                        <string key="NSAction">_doScroller:</string>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{1, 119}, {223, 15}}</string>
                                                                                                                        <reference key="NSSuperview" ref="120910671"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="906471260"/>
                                                                                                                        <int key="NSsFlags">1</int>
                                                                                                                        <reference key="NSTarget" ref="120910671"/>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 0}, {243, 17}}</string>
                                                                                                                        <reference key="NSSuperview" ref="120910671"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="252866414"/>
                                                                                                                        <reference key="NSDocView" ref="252866414"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                        </object>
                                                                                                        <string key="NSFrame">{{10, 28}, {245, 96}}</string>
                                                                                                        <reference key="NSSuperview" ref="503791488"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="267706067"/>
                                                                                                        <int key="NSsFlags">133682</int>
                                                                                                        <reference key="NSVScroller" ref="673955935"/>
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{265, 134}</string>
                                                                                        <reference key="NSSuperview" ref="947081420"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="120910671"/>
                                                                                        <string key="NSClassName">InspectorPaneBody</string>
                                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{3, 2}, {13, 13}}</string>
                                                                                                        <reference key="NSSuperview" ref="232892116"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="788962288"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="344629649">
                                                                                                        <int key="NSvFlags">266</int>
                                                                                                        <string key="NSFrame">{{16, 1}, {242, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="232892116"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="503791488"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="1006638272">
                                                                                        </object>
                                                                                        <string key="NSFrame">{{0, 134}, {265, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="947081420"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="737324717"/>
                                                                                        <string key="NSClassName">InspectorPaneHead</string>
                                                                                </object>
                                                                        </object>
                                                                        <string key="NSFrame">{{0, 317}, {265, 151}}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="232892116"/>
                                                                        <string key="NSClassName">InspectorPane</string>
                                                                </object>
                                                                                                        <int key="NSvFlags">289</int>
                                                                                                        <string key="NSFrame">{{183, 8}, {72, 17}}</string>
                                                                                                        <reference key="NSSuperview" ref="755384511"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="947081420"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="391197674">
                                                                                                        <int key="NSvFlags">289</int>
                                                                                                        <string key="NSFrame">{{10, 8}, {72, 17}}</string>
                                                                                                        <reference key="NSSuperview" ref="755384511"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="469920519"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="129685273">
                                                                                                                                        <int key="NSvFlags">4352</int>
                                                                                                                                        <string key="NSFrameSize">{243, 78}</string>
                                                                                                                                        <reference key="NSSuperview" ref="551404140"/>
-                                                                                                                                       <reference key="NSWindow"/>
                                                                                                                                        <reference key="NSNextKeyView" ref="709501631"/>
                                                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                                                        <object class="NSTableHeaderView" key="NSHeaderView" id="932372225">
                                                                                                                                                <int key="NSvFlags">256</int>
                                                                                                                                                <string key="NSFrameSize">{243, 17}</string>
                                                                                                                                                <reference key="NSSuperview" ref="665063948"/>
-                                                                                                                                               <reference key="NSWindow"/>
                                                                                                                                                <reference key="NSNextKeyView" ref="551404140"/>
                                                                                                                                                <reference key="NSTableView" ref="286366462"/>
                                                                                                                                        </object>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 17}, {243, 78}}</string>
                                                                                                                        <reference key="NSSuperview" ref="572502054"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="286366462"/>
                                                                                                                        <reference key="NSDocView" ref="286366462"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{224, 17}, {15, 102}}</string>
                                                                                                                        <reference key="NSSuperview" ref="572502054"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="901038608"/>
                                                                                                                        <reference key="NSTarget" ref="572502054"/>
                                                                                                                        <string key="NSAction">_doScroller:</string>
                                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                                        <string key="NSFrame">{{1, 80}, {243, 15}}</string>
                                                                                                                        <reference key="NSSuperview" ref="572502054"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="629128588"/>
                                                                                                                        <int key="NSsFlags">1</int>
                                                                                                                        <reference key="NSTarget" ref="572502054"/>
                                                                                                                        </object>
                                                                                                                        <string key="NSFrame">{{1, 0}, {243, 17}}</string>
                                                                                                                        <reference key="NSSuperview" ref="572502054"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="932372225"/>
                                                                                                                        <reference key="NSDocView" ref="932372225"/>
                                                                                                                        <reference key="NSBGColor" ref="465271680"/>
                                                                                                        </object>
                                                                                                        <string key="NSFrame">{{10, 29}, {245, 96}}</string>
                                                                                                        <reference key="NSSuperview" ref="755384511"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="665063948"/>
                                                                                                        <int key="NSsFlags">133682</int>
                                                                                                        <reference key="NSVScroller" ref="629128588"/>
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{265, 135}</string>
                                                                                        <reference key="NSSuperview" ref="155983749"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="572502054"/>
                                                                                        <string key="NSClassName">InspectorPaneBody</string>
                                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{3, 2}, {13, 13}}</string>
                                                                                                        <reference key="NSSuperview" ref="303582316"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="240834725"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="341762827">
                                                                                                        <int key="NSvFlags">266</int>
                                                                                                        <string key="NSFrame">{{16, 1}, {242, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="303582316"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="755384511"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="7493704">
                                                                                        </object>
                                                                                        <string key="NSFrame">{{0, 135}, {265, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="155983749"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="709002073"/>
                                                                                        <string key="NSClassName">InspectorPaneHead</string>
                                                                                </object>
                                                                        </object>
                                                                        <string key="NSFrame">{{0, 468}, {265, 152}}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="303582316"/>
                                                                        <string key="NSClassName">InspectorPane</string>
                                                                </object>
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 8}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="155983749"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="1062440717">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 8}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="228361828"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="911594414">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 23}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="929080276"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="1057296694">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 23}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="954520343"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="925702932">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 38}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="211774994"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="960301698">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 38}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="548192102"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="128217418">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 53}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="94055971"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="139312486">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 53}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="473869670"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="34164445">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 68}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="78908821"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="222363476">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 68}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="971604804"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="372926440">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 83}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="674854504"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="846795110">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 83}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="603293485"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="658407376">
                                                                                                        <int key="NSvFlags">270</int>
                                                                                                        <string key="NSFrame">{{81, 98}, {174, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="33343148"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="52118929">
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{9, 98}, {72, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="996229298"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="370402369"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="834079889">
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{265, 120}</string>
                                                                                        <reference key="NSSuperview" ref="389520739"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="165561053"/>
                                                                                        <string key="NSClassName">InspectorPaneBody</string>
                                                                                </object>
                                                                                                        <int key="NSvFlags">268</int>
                                                                                                        <string key="NSFrame">{{3, 2}, {13, 13}}</string>
                                                                                                        <reference key="NSSuperview" ref="1058481842"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="562831975"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSButtonCell" key="NSCell" id="132855655">
                                                                                                        <int key="NSvFlags">266</int>
                                                                                                        <string key="NSFrame">{{16, 1}, {242, 14}}</string>
                                                                                                        <reference key="NSSuperview" ref="1058481842"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="996229298"/>
                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                        <object class="NSTextFieldCell" key="NSCell" id="825655961">
                                                                                        </object>
                                                                                        <string key="NSFrame">{{0, 120}, {265, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="389520739"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="233616952"/>
                                                                                        <string key="NSClassName">InspectorPaneHead</string>
                                                                                </object>
                                                                        </object>
                                                                        <string key="NSFrame">{{0, 620}, {265, 137}}</string>
                                                                        <reference key="NSSuperview" ref="368126898"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="1058481842"/>
                                                                        <string key="NSClassName">InspectorPane</string>
                                                                </object>
                                                        </object>
                                                        <string key="NSFrameSize">{265, 757}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="389520739"/>
                                                        <string key="NSReuseIdentifierKey">_NS:9</string>
                                                        <string key="NSClassName">InspectorPaneContainer</string>
                                        </object>
                                        <string key="NSFrameSize">{265, 810}</string>
                                        <reference key="NSSuperview"/>
-                                       <reference key="NSWindow"/>
                                        <reference key="NSNextKeyView" ref="470064219"/>
                                </object>
                                <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
                                <string key="NSInitialKey">key</string>
                                <string key="NSInitialValue">value</string>
                        </object>
-                       <object class="NSDictionaryController" id="86063028">
+                       <object class="NSArrayController" id="915083149">
+                               <object class="NSMutableArray" key="NSDeclaredKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>name</string>
+                                       <string>group</string>
+                                       <string>permission</string>
+                               </object>
+                               <string key="NSObjectClassName">ASIPithosSharingUser</string>
+                               <bool key="NSEditable">YES</bool>
+                               <object class="_NSManagedProxy" key="_NSManagedProxy"/>
                                <bool key="NSAvoidsEmptySelection">YES</bool>
                                <bool key="NSPreservesSelection">YES</bool>
                                <bool key="NSSelectsInsertedObjects">YES</bool>
                                <bool key="NSFilterRestrictsInsertion">YES</bool>
-                               <object class="NSArray" key="NSSortDescriptors">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <object class="NSSortDescriptor">
-                                               <string key="NSKey">key</string>
-                                               <bool key="NSAscending">YES</bool>
-                                               <string key="NSSelector">compare:</string>
-                                       </object>
-                               </object>
                                <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
-                               <string key="NSInitialKey">key</string>
-                               <string key="NSInitialValue">value</string>
                        </object>
                        <object class="NSArrayController" id="460336703">
                                <bool key="NSEditable">YES</bool>
                        <object class="NSCustomObject" id="974608694">
                                <string key="NSClassName">NonEmptyStringFormatter</string>
                        </object>
-                       <object class="NSCustomObject" id="685782685">
-                               <string key="NSClassName">SharingNameFormatter</string>
-                       </object>
                </object>
                <object class="IBObjectContainer" key="IBDocument.Objects">
                        <object class="NSMutableArray" key="connectionRecords">
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
-                                               <string key="label">sharingDictionaryController</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="86063028"/>
-                                       </object>
-                                       <int key="connectionID">320</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
                                                <string key="label">versionsInspectorPane</string>
                                                <reference key="source" ref="1001"/>
                                                <reference key="destination" ref="155983749"/>
                                        <int key="connectionID">1500</int>
                                </object>
                                <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">sharingArrayController</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="915083149"/>
+                                       </object>
+                                       <int key="connectionID">1522</int>
+                               </object>
+                               <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
                                                <string key="label">displayPatternTitle1: self.node.displayName</string>
                                                <reference key="source" ref="1005"/>
                                        <int key="connectionID">1249</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">contentDictionary: node.pithosObject.sharing</string>
-                                               <reference key="source" ref="86063028"/>
-                                               <reference key="destination" ref="1001"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="86063028"/>
-                                                       <reference key="NSDestination" ref="1001"/>
-                                                       <string key="NSLabel">contentDictionary: node.pithosObject.sharing</string>
-                                                       <string key="NSBinding">contentDictionary</string>
-                                                       <string key="NSKeyPath">node.pithosObject.sharing</string>
-                                                       <object class="NSDictionary" key="NSOptions">
-                                                               <string key="NS.key.0">NSValueTransformerName</string>
-                                                               <string key="NS.object.0">SharingDictionaryTransformer</string>
-                                                       </object>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">298</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">add:</string>
-                                               <reference key="source" ref="86063028"/>
-                                               <reference key="destination" ref="72992134"/>
-                                       </object>
-                                       <int key="connectionID">1331</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">remove:</string>
-                                               <reference key="source" ref="86063028"/>
-                                               <reference key="destination" ref="257358261"/>
-                                       </object>
-                                       <int key="connectionID">1330</int>
-                               </object>
-                               <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
                                                <string key="label">paneHead</string>
                                                <reference key="source" ref="389520739"/>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">enabled2: node.sharingAccount</string>
+                                               <string key="label">enabled: node.sharingAccount</string>
                                                <reference key="source" ref="257358261"/>
                                                <reference key="destination" ref="1001"/>
-                                               <object class="NSNibBindingConnector" key="connector">
+                                               <object class="NSNibBindingConnector" key="connector" id="702480936">
                                                        <reference key="NSSource" ref="257358261"/>
                                                        <reference key="NSDestination" ref="1001"/>
-                                                       <string key="NSLabel">enabled2: node.sharingAccount</string>
-                                                       <string key="NSBinding">enabled2</string>
+                                                       <string key="NSLabel">enabled: node.sharingAccount</string>
+                                                       <string key="NSBinding">enabled</string>
                                                        <string key="NSKeyPath">node.sharingAccount</string>
                                                        <object class="NSDictionary" key="NSOptions">
                                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                                        <string>NSNoSelectionPlaceholder</string>
                                                                        <string>NSNotApplicablePlaceholder</string>
                                                                        <string>NSNullPlaceholder</string>
-                                                                       <string>NSValueTransformerName</string>
                                                                </object>
                                                                <object class="NSArray" key="dict.values">
                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                                        <integer value="-1"/>
                                                                        <integer value="-1"/>
                                                                        <integer value="-1"/>
-                                                                       <string>SharingAccountBoolTransformer</string>
                                                                </object>
                                                        </object>
-                                                       <reference key="NSPreviousConnector" ref="76589500"/>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1319</int>
+                                       <int key="connectionID">1557</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">enabled: canRemove</string>
+                                               <string key="label">enabled2: canRemove</string>
                                                <reference key="source" ref="257358261"/>
-                                               <reference key="destination" ref="86063028"/>
-                                               <object class="NSNibBindingConnector" key="connector" id="76589500">
+                                               <reference key="destination" ref="915083149"/>
+                                               <object class="NSNibBindingConnector" key="connector">
                                                        <reference key="NSSource" ref="257358261"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
-                                                       <string key="NSLabel">enabled: canRemove</string>
-                                                       <string key="NSBinding">enabled</string>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">enabled2: canRemove</string>
+                                                       <string key="NSBinding">enabled2</string>
                                                        <string key="NSKeyPath">canRemove</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSArray" key="dict.sortedKeys">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>NSMultipleValuesPlaceholder</string>
+                                                                       <string>NSNoSelectionPlaceholder</string>
+                                                                       <string>NSNotApplicablePlaceholder</string>
+                                                                       <string>NSNullPlaceholder</string>
+                                                               </object>
+                                                               <object class="NSArray" key="dict.values">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <integer value="-1"/>
+                                                                       <integer value="-1"/>
+                                                                       <integer value="-1"/>
+                                                                       <integer value="-1"/>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSPreviousConnector" ref="702480936"/>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1318</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">sortDescriptors: sortDescriptors</string>
-                                               <reference key="source" ref="309966560"/>
-                                               <reference key="destination" ref="86063028"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="309966560"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
-                                                       <string key="NSLabel">sortDescriptors: sortDescriptors</string>
-                                                       <string key="NSBinding">sortDescriptors</string>
-                                                       <string key="NSKeyPath">sortDescriptors</string>
-                                                       <reference key="NSPreviousConnector" ref="192160763"/>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">1327</int>
+                                       <int key="connectionID">1589</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
                                                <string key="label">content: arrangedObjects</string>
                                                <reference key="source" ref="309966560"/>
-                                               <reference key="destination" ref="86063028"/>
+                                               <reference key="destination" ref="915083149"/>
                                                <object class="NSNibBindingConnector" key="connector" id="292208880">
                                                        <reference key="NSSource" ref="309966560"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
+                                                       <reference key="NSDestination" ref="915083149"/>
                                                        <string key="NSLabel">content: arrangedObjects</string>
                                                        <string key="NSBinding">content</string>
                                                        <string key="NSKeyPath">arrangedObjects</string>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1325</int>
+                                       <int key="connectionID">1590</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">enabled: node.sharingAccount</string>
+                                               <string key="label">selectionIndexes: selectionIndexes</string>
                                                <reference key="source" ref="309966560"/>
-                                               <reference key="destination" ref="1001"/>
-                                               <object class="NSNibBindingConnector" key="connector">
+                                               <reference key="destination" ref="915083149"/>
+                                               <object class="NSNibBindingConnector" key="connector" id="192160763">
                                                        <reference key="NSSource" ref="309966560"/>
-                                                       <reference key="NSDestination" ref="1001"/>
-                                                       <string key="NSLabel">enabled: node.sharingAccount</string>
-                                                       <string key="NSBinding">enabled</string>
-                                                       <string key="NSKeyPath">node.sharingAccount</string>
-                                                       <object class="NSDictionary" key="NSOptions">
-                                                               <string key="NS.key.0">NSValueTransformerName</string>
-                                                               <string key="NS.object.0">SharingAccountBoolTransformer</string>
-                                                       </object>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">selectionIndexes: selectionIndexes</string>
+                                                       <string key="NSBinding">selectionIndexes</string>
+                                                       <string key="NSKeyPath">selectionIndexes</string>
+                                                       <reference key="NSPreviousConnector" ref="292208880"/>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1329</int>
+                                       <int key="connectionID">1592</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">selectionIndexes: selectionIndexes</string>
+                                               <string key="label">sortDescriptors: sortDescriptors</string>
                                                <reference key="source" ref="309966560"/>
-                                               <reference key="destination" ref="86063028"/>
-                                               <object class="NSNibBindingConnector" key="connector" id="192160763">
+                                               <reference key="destination" ref="915083149"/>
+                                               <object class="NSNibBindingConnector" key="connector">
                                                        <reference key="NSSource" ref="309966560"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
-                                                       <string key="NSLabel">selectionIndexes: selectionIndexes</string>
-                                                       <string key="NSBinding">selectionIndexes</string>
-                                                       <string key="NSKeyPath">selectionIndexes</string>
-                                                       <reference key="NSPreviousConnector" ref="292208880"/>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">sortDescriptors: sortDescriptors</string>
+                                                       <string key="NSBinding">sortDescriptors</string>
+                                                       <string key="NSKeyPath">sortDescriptors</string>
+                                                       <reference key="NSPreviousConnector" ref="192160763"/>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1326</int>
+                                       <int key="connectionID">1593</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: arrangedObjects.key</string>
+                                               <string key="label">value: arrangedObjects.name</string>
                                                <reference key="source" ref="823533572"/>
-                                               <reference key="destination" ref="86063028"/>
+                                               <reference key="destination" ref="915083149"/>
                                                <object class="NSNibBindingConnector" key="connector">
                                                        <reference key="NSSource" ref="823533572"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
-                                                       <string key="NSLabel">value: arrangedObjects.key</string>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">value: arrangedObjects.name</string>
                                                        <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">arrangedObjects.key</string>
+                                                       <string key="NSKeyPath">arrangedObjects.name</string>
                                                        <object class="NSDictionary" key="NSOptions">
                                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                                <object class="NSArray" key="dict.sortedKeys">
                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                       <string>NSConditionallySetsEditable</string>
+                                                                       <string>NSNullPlaceholder</string>
                                                                        <string>NSValidatesImmediately</string>
                                                                </object>
                                                                <object class="NSArray" key="dict.values">
                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                       <boolean value="NO"/>
+                                                                       <string>user</string>
                                                                        <boolean value="YES"/>
                                                                </object>
                                                        </object>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1321</int>
+                                       <int key="connectionID">1597</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: arrangedObjects.value</string>
+                                               <string key="label">enabled: node.sharingAccount</string>
+                                               <reference key="source" ref="823533572"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="823533572"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">enabled: node.sharingAccount</string>
+                                                       <string key="NSBinding">enabled</string>
+                                                       <string key="NSKeyPath">node.sharingAccount</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSValueTransformerName</string>
+                                                               <string key="NS.object.0">SharingAccountBoolTransformer</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">1615</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: arrangedObjects.permission</string>
                                                <reference key="source" ref="926856395"/>
-                                               <reference key="destination" ref="86063028"/>
+                                               <reference key="destination" ref="915083149"/>
                                                <object class="NSNibBindingConnector" key="connector">
                                                        <reference key="NSSource" ref="926856395"/>
-                                                       <reference key="NSDestination" ref="86063028"/>
-                                                       <string key="NSLabel">value: arrangedObjects.value</string>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">value: arrangedObjects.permission</string>
                                                        <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">arrangedObjects.value</string>
+                                                       <string key="NSKeyPath">arrangedObjects.permission</string>
                                                        <object class="NSDictionary" key="NSOptions">
                                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                                <object class="NSArray" key="dict.sortedKeys">
                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                       <string>NSConditionallySetsEnabled</string>
                                                                        <string>NSValidatesImmediately</string>
+                                                                       <string>NSValueTransformerName</string>
                                                                </object>
                                                                <object class="NSArray" key="dict.values">
                                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                       <boolean value="NO"/>
                                                                        <boolean value="YES"/>
+                                                                       <string>SharingUserPermissionTransformer</string>
                                                                </object>
                                                        </object>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">1320</int>
+                                       <int key="connectionID">1610</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">formatter</string>
-                                               <reference key="source" ref="545074295"/>
-                                               <reference key="destination" ref="685782685"/>
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">enabled: node.sharingAccount</string>
+                                               <reference key="source" ref="926856395"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="926856395"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">enabled: node.sharingAccount</string>
+                                                       <string key="NSBinding">enabled</string>
+                                                       <string key="NSKeyPath">node.sharingAccount</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSValueTransformerName</string>
+                                                               <string key="NS.object.0">SharingAccountBoolTransformer</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
                                        </object>
-                                       <int key="connectionID">1332</int>
+                                       <int key="connectionID">1623</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
                                        </object>
                                        <int key="connectionID">1489</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: arrangedObjects.group</string>
+                                               <reference key="source" ref="42482962"/>
+                                               <reference key="destination" ref="915083149"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="42482962"/>
+                                                       <reference key="NSDestination" ref="915083149"/>
+                                                       <string key="NSLabel">value: arrangedObjects.group</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">arrangedObjects.group</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSArray" key="dict.sortedKeys">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>NSNullPlaceholder</string>
+                                                                       <string>NSValidatesImmediately</string>
+                                                               </object>
+                                                               <object class="NSArray" key="dict.values">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>group</string>
+                                                                       <boolean value="YES"/>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">1601</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">enabled: node.sharingAccount</string>
+                                               <reference key="source" ref="42482962"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="42482962"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">enabled: node.sharingAccount</string>
+                                                       <string key="NSBinding">enabled</string>
+                                                       <string key="NSKeyPath">node.sharingAccount</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSValueTransformerName</string>
+                                                               <string key="NS.object.0">SharingAccountBoolTransformer</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">1619</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">add:</string>
+                                               <reference key="source" ref="915083149"/>
+                                               <reference key="destination" ref="72992134"/>
+                                       </object>
+                                       <int key="connectionID">1585</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">remove:</string>
+                                               <reference key="source" ref="915083149"/>
+                                               <reference key="destination" ref="257358261"/>
+                                       </object>
+                                       <int key="connectionID">1586</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">contentArray: node.translatedPermissions</string>
+                                               <reference key="source" ref="915083149"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="915083149"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">contentArray: node.translatedPermissions</string>
+                                                       <string key="NSBinding">contentArray</string>
+                                                       <string key="NSKeyPath">node.translatedPermissions</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSValidatesImmediately</string>
+                                                               <boolean value="YES" key="NS.object.0"/>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">1609</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
                                                <reference key="parent" ref="0"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">295</int>
-                                               <reference key="object" ref="86063028"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">Dictionary Controller (Sharing)</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">321</int>
-                                               <reference key="object" ref="685782685"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">5</int>
                                                <reference key="object" ref="56844250"/>
                                                <object class="NSMutableArray" key="children">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <reference ref="926856395"/>
                                                        <reference ref="823533572"/>
+                                                       <reference ref="42482962"/>
                                                </object>
                                                <reference key="parent" ref="466991564"/>
                                        </object>
                                                <reference key="object" ref="129685273"/>
                                                <reference key="parent" ref="901038608"/>
                                        </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1502</int>
+                                               <reference key="object" ref="42482962"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1016520155"/>
+                                               </object>
+                                               <reference key="parent" ref="309966560"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1503</int>
+                                               <reference key="object" ref="1016520155"/>
+                                               <reference key="parent" ref="42482962"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1516</int>
+                                               <reference key="object" ref="915083149"/>
+                                               <reference key="parent" ref="0"/>
+                                               <string key="objectName">Array Controller (Sharing)</string>
+                                       </object>
                                </object>
                        </object>
                        <object class="NSMutableDictionary" key="flattenedProperties">
                                        <string>1457.IBPluginDependency</string>
                                        <string>1483.IBPluginDependency</string>
                                        <string>1484.IBPluginDependency</string>
+                                       <string>1502.IBPluginDependency</string>
+                                       <string>1503.IBPluginDependency</string>
+                                       <string>1516.IBPluginDependency</string>
                                        <string>2.IBPluginDependency</string>
                                        <string>257.IBPluginDependency</string>
-                                       <string>295.IBPluginDependency</string>
                                        <string>3.IBPluginDependency</string>
-                                       <string>321.IBPluginDependency</string>
                                        <string>4.IBPluginDependency</string>
                                        <string>5.IBPluginDependency</string>
                                        <string>6.IBPluginDependency</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <object class="NSArray">
                                                <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <string>read only</string>
-                                               <string>read/write</string>
+                                               <string>Read Only</string>
+                                               <string>Read/Write</string>
                                        </object>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                </object>
                        </object>
                        <object class="NSMutableDictionary" key="unlocalizedProperties">
                                <reference key="dict.values" ref="0"/>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">1501</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">InspectorPane</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <string key="NS.key.0">toggleCollapsed:</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <string key="NS.key.0">toggleCollapsed:</string>
-                                               <object class="IBActionInfo" key="NS.object.0">
-                                                       <string key="name">toggleCollapsed:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>collapseButton</string>
-                                                       <string>paneBody</string>
-                                                       <string>paneHead</string>
-                                                       <string>titleTextField</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSButton</string>
-                                                       <string>InspectorPaneBody</string>
-                                                       <string>InspectorPaneHead</string>
-                                                       <string>NSTextField</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>collapseButton</string>
-                                                       <string>paneBody</string>
-                                                       <string>paneHead</string>
-                                                       <string>titleTextField</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">collapseButton</string>
-                                                               <string key="candidateClassName">NSButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">paneBody</string>
-                                                               <string key="candidateClassName">InspectorPaneBody</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">paneHead</string>
-                                                               <string key="candidateClassName">InspectorPaneHead</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">titleTextField</string>
-                                                               <string key="candidateClassName">NSTextField</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/InspectorPane.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">InspectorPaneBody</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/InspectorPaneBody.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">InspectorPaneContainer</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/InspectorPaneContainer.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">InspectorPaneHead</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <string key="NS.key.0">pane</string>
-                                               <string key="NS.object.0">InspectorPane</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <string key="NS.key.0">pane</string>
-                                               <object class="IBToOneOutletInfo" key="NS.object.0">
-                                                       <string key="name">pane</string>
-                                                       <string key="candidateClassName">InspectorPane</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/InspectorPaneHead.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NonEmptyStringFormatter</string>
-                                       <string key="superclassName">NSFormatter</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NonEmptyStringFormatter.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">PithosNodeInfoController</string>
-                                       <string key="superclassName">NSWindowController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/PithosNodeInfoController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">PithosObjectNodeInfoController</string>
-                                       <string key="superclassName">PithosNodeInfoController</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <string key="NS.key.0">downloadVersion:</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <string key="NS.key.0">downloadVersion:</string>
-                                               <object class="IBActionInfo" key="NS.object.0">
-                                                       <string key="name">downloadVersion:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>metadataDictionaryController</string>
-                                                       <string>metadataInspectorPane</string>
-                                                       <string>otherMetadataInspectorPane</string>
-                                                       <string>sharingDictionaryController</string>
-                                                       <string>versionsArrayController</string>
-                                                       <string>versionsInspectorPane</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSDictionaryController</string>
-                                                       <string>InspectorPane</string>
-                                                       <string>InspectorPane</string>
-                                                       <string>NSDictionaryController</string>
-                                                       <string>NSArrayController</string>
-                                                       <string>InspectorPane</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>metadataDictionaryController</string>
-                                                       <string>metadataInspectorPane</string>
-                                                       <string>otherMetadataInspectorPane</string>
-                                                       <string>sharingDictionaryController</string>
-                                                       <string>versionsArrayController</string>
-                                                       <string>versionsInspectorPane</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">metadataDictionaryController</string>
-                                                               <string key="candidateClassName">NSDictionaryController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">metadataInspectorPane</string>
-                                                               <string key="candidateClassName">InspectorPane</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">otherMetadataInspectorPane</string>
-                                                               <string key="candidateClassName">InspectorPane</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">sharingDictionaryController</string>
-                                                               <string key="candidateClassName">NSDictionaryController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">versionsArrayController</string>
-                                                               <string key="candidateClassName">NSArrayController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">versionsInspectorPane</string>
-                                                               <string key="candidateClassName">InspectorPane</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/PithosObjectNodeInfoController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">SharingNameFormatter</string>
-                                       <string key="superclassName">NSFormatter</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/SharingNameFormatter.h</string>
-                                       </object>
-                               </object>
-                       </object>
+                       <int key="maxID">1623</int>
                </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes"/>
                <int key="IBDocument.localizationMode">0</int>
                <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
                <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
index 49a80df..a00c1e6 100644 (file)
@@ -82,6 +82,7 @@
                                                                                        <int key="NSvFlags">256</int>
                                                                                        <string key="NSFrameSize">{118, 215}</string>
                                                                                        <reference key="NSSuperview" ref="475745140"/>
+                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="366650902"/>
                                                                                        <string key="NSReuseIdentifierKey">_NS:1828</string>
                                                                                        <bool key="NSEnabled">YES</bool>
@@ -90,6 +91,7 @@
                                                                                                <int key="NSvFlags">256</int>
                                                                                                <string key="NSFrameSize">{118, 17}</string>
                                                                                                <reference key="NSSuperview" ref="316124907"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="475745140"/>
                                                                                                <string key="NSReuseIdentifierKey">_NS:1830</string>
                                                                                                <reference key="NSTableView" ref="260212452"/>
                                                                        </object>
                                                                        <string key="NSFrame">{{1, 17}, {118, 215}}</string>
                                                                        <reference key="NSSuperview" ref="419137310"/>
+                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="260212452"/>
                                                                        <string key="NSReuseIdentifierKey">_NS:1826</string>
                                                                        <reference key="NSDocView" ref="260212452"/>
                                                                        <int key="NSvFlags">-2147483392</int>
                                                                        <string key="NSFrame">{{224, 17}, {15, 102}}</string>
                                                                        <reference key="NSSuperview" ref="419137310"/>
+                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="287845150"/>
                                                                        <string key="NSReuseIdentifierKey">_NS:1845</string>
                                                                        <reference key="NSTarget" ref="419137310"/>
                                                                        <int key="NSvFlags">-2147483392</int>
                                                                        <string key="NSFrame">{{1, 48.325627356767654}, {82.028970718383789, 15}}</string>
                                                                        <reference key="NSSuperview" ref="419137310"/>
+                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="310368570"/>
                                                                        <string key="NSReuseIdentifierKey">_NS:1847</string>
                                                                        <int key="NSsFlags">1</int>
                                                                        </object>
                                                                        <string key="NSFrame">{{1, 0}, {118, 17}}</string>
                                                                        <reference key="NSSuperview" ref="419137310"/>
+                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="152792208"/>
                                                                        <string key="NSReuseIdentifierKey">_NS:1831</string>
                                                                        <reference key="NSDocView" ref="152792208"/>
                                                        </object>
                                                        <string key="NSFrame">{{20, 47}, {120, 233}}</string>
                                                        <reference key="NSSuperview" ref="369507901"/>
+                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="316124907"/>
                                                        <string key="NSReuseIdentifierKey">_NS:1824</string>
                                                        <int key="NSsFlags">133682</int>
                                                        <int key="NSvFlags">18</int>
                                                        <string key="NSFrame">{{147, 37}, {265, 249}}</string>
                                                        <reference key="NSSuperview" ref="369507901"/>
+                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="646624756"/>
                                                        <string key="NSReuseIdentifierKey">_NS:608</string>
                                                        <object class="NSMutableArray" key="NSTabViewItems">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{14, 183}, {41, 14}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="96425952"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="9695847">
                                                                                                <int key="NSvFlags">266</int>
                                                                                                <string key="NSFrame">{{60, 181}, {168, 19}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="571994001"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="34677607">
                                                                                                <int key="NSvFlags">266</int>
                                                                                                <string key="NSFrame">{{60, 123}, {168, 19}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="1017221490"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="1001750419">
                                                                                                <int key="NSvFlags">266</int>
                                                                                                <string key="NSFrame">{{60, 96}, {168, 19}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="525437489"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="350801514">
                                                                                                <int key="NSvFlags">266</int>
                                                                                                <string key="NSFrame">{{60, 69}, {168, 19}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="666198740"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="772611148">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{14, 125}, {41, 14}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="287579732"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="993321662">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{14, 71}, {41, 14}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="92717922"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="887494614">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{14, 98}, {41, 14}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="773004803"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="1037784646">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{14, 150}, {86, 14}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="507142965"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSTextFieldCell" key="NSCell" id="784421446">
                                                                                                <int key="NSvFlags">-2147483634</int>
                                                                                                <string key="NSFrame">{{-3, 170}, {251, 5}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="992895966"/>
                                                                                                <string key="NSOffsets">{0, 0}</string>
                                                                                                <object class="NSTextFieldCell" key="NSTitleCell">
                                                                                                <int key="NSvFlags">268</int>
                                                                                                <string key="NSFrame">{{57, 45}, {63, 18}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="764785507"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSButtonCell" key="NSCell" id="269907300">
                                                                                                <int key="NSvFlags">289</int>
                                                                                                <string key="NSFrame">{{161, 4}, {72, 28}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSButtonCell" key="NSCell" id="950873176">
                                                                                                <int key="NSvFlags">289</int>
                                                                                                <string key="NSFrame">{{91, 4}, {72, 28}}</string>
                                                                                                <reference key="NSSuperview" ref="646624756"/>
+                                                                                               <reference key="NSWindow"/>
                                                                                                <reference key="NSNextKeyView" ref="750494034"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSButtonCell" key="NSCell" id="327493266">
                                                                                </object>
                                                                                <string key="NSFrame">{{10, 33}, {245, 203}}</string>
                                                                                <reference key="NSSuperview" ref="247568729"/>
+                                                                               <reference key="NSWindow"/>
                                                                                <reference key="NSNextKeyView" ref="1055886655"/>
                                                                                <string key="NSReuseIdentifierKey">_NS:610</string>
                                                                        </object>
                                                                                                <int key="NSvFlags">289</int>
                                                                                                <string key="NSFrame">{{161, 4}, {72, 28}}</string>
                                                                                                <reference key="NSSuperview" ref="689284120"/>
-                                                                                               <reference key="NSNextKeyView"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSButtonCell" key="NSCell" id="592322209">
                                                                                                        <int key="NSCellFlags">-2080244224</int>
                                                                                                                                <int key="NSvFlags">256</int>
                                                                                                                                <string key="NSFrameSize">{209, 95}</string>
                                                                                                                                <reference key="NSSuperview" ref="490888020"/>
-                                                                                                                               <reference key="NSNextKeyView" ref="140942393"/>
+                                                                                                                               <reference key="NSNextKeyView" ref="677192773"/>
                                                                                                                                <string key="NSReuseIdentifierKey">_NS:13</string>
                                                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                                                <object class="NSTableHeaderView" key="NSHeaderView" id="1047592526">
                                                                                                </object>
                                                                                                <string key="NSFrame">{{17, 40}, {211, 113}}</string>
                                                                                                <reference key="NSSuperview" ref="689284120"/>
-                                                                                               <reference key="NSNextKeyView" ref="677192773"/>
+                                                                                               <reference key="NSNextKeyView" ref="490888020"/>
                                                                                                <string key="NSReuseIdentifierKey">_NS:9</string>
                                                                                                <int key="NSsFlags">133682</int>
                                                                                                <reference key="NSVScroller" ref="140942393"/>
                                                                                                                                <int key="NSvFlags">4352</int>
                                                                                                                                <string key="NSFrameSize">{103, 116}</string>
                                                                                                                                <reference key="NSSuperview" ref="748581994"/>
-                                                                                                                               <reference key="NSNextKeyView" ref="613407224"/>
+                                                                                                                               <reference key="NSNextKeyView" ref="881351662"/>
                                                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                                                <object class="NSTableHeaderView" key="NSHeaderView" id="94922151">
                                                                                                                                        <reference key="NSNextResponder" ref="5455797"/>
                                                                                                </object>
                                                                                                <string key="NSFrame">{{17, 66}, {105, 134}}</string>
                                                                                                <reference key="NSSuperview" ref="635100516"/>
-                                                                                               <reference key="NSNextKeyView" ref="881351662"/>
+                                                                                               <reference key="NSNextKeyView" ref="748581994"/>
                                                                                                <int key="NSsFlags">133682</int>
                                                                                                <reference key="NSVScroller" ref="881351662"/>
                                                                                                <reference key="NSHScroller" ref="613407224"/>
                                                                                                                                <int key="NSvFlags">4352</int>
                                                                                                                                <string key="NSFrameSize">{103, 116}</string>
                                                                                                                                <reference key="NSSuperview" ref="441382477"/>
-                                                                                                                               <reference key="NSNextKeyView" ref="79495429"/>
+                                                                                                                               <reference key="NSNextKeyView" ref="176697034"/>
                                                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                                                <object class="NSTableHeaderView" key="NSHeaderView" id="459733499">
                                                                                                                                        <reference key="NSNextResponder" ref="302523439"/>
                                                                                                </object>
                                                                                                <string key="NSFrame">{{123, 66}, {105, 134}}</string>
                                                                                                <reference key="NSSuperview" ref="635100516"/>
-                                                                                               <reference key="NSNextKeyView" ref="176697034"/>
+                                                                                               <reference key="NSNextKeyView" ref="441382477"/>
                                                                                                <int key="NSsFlags">133682</int>
                                                                                                <reference key="NSVScroller" ref="176697034"/>
                                                                                                <reference key="NSHScroller" ref="79495429"/>
                                                                                                <int key="NSvFlags">289</int>
                                                                                                <string key="NSFrame">{{161, 4}, {72, 28}}</string>
                                                                                                <reference key="NSSuperview" ref="635100516"/>
-                                                                                               <reference key="NSNextKeyView"/>
                                                                                                <bool key="NSEnabled">YES</bool>
                                                                                                <object class="NSButtonCell" key="NSCell" id="683879656">
                                                                                                        <int key="NSCellFlags">-2080244224</int>
                                                        <int key="NSvFlags">292</int>
                                                        <string key="NSFrame">{{20, 19}, {20, 20}}</string>
                                                        <reference key="NSSuperview" ref="369507901"/>
+                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="862152318"/>
                                                        <string key="NSReuseIdentifierKey">_NS:2510</string>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <int key="NSvFlags">292</int>
                                                        <string key="NSFrame">{{39, 19}, {20, 20}}</string>
                                                        <reference key="NSSuperview" ref="369507901"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="247568729"/>
                                                        <string key="NSReuseIdentifierKey">_NS:2510</string>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSButtonCell" key="NSCell" id="850026501">
                                        </object>
                                        <string key="NSFrameSize">{425, 300}</string>
                                        <reference key="NSSuperview"/>
+                                       <reference key="NSWindow"/>
                                        <reference key="NSNextKeyView" ref="419137310"/>
                                </object>
                                <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
                                <string key="NSInitialKey">key</string>
                                <string key="NSInitialValue">value</string>
                        </object>
-                       <object class="NSCustomObject" id="548435475">
-                               <string key="NSClassName">NonEmptyStringFormatter</string>
-                       </object>
                </object>
                <object class="IBObjectContainer" key="IBDocument.Objects">
                        <object class="NSMutableArray" key="connectionRecords">
                                                <reference key="parent" ref="183740387"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">484</int>
-                                               <reference key="object" ref="548435475"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">Non Empty String Formatter</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">505</int>
                                                <reference key="object" ref="419137310"/>
                                                <object class="NSMutableArray" key="children">
                                        <string>338.IBPluginDependency</string>
                                        <string>396.IBPluginDependency</string>
                                        <string>433.IBPluginDependency</string>
-                                       <string>484.IBPluginDependency</string>
                                        <string>5.IBPluginDependency</string>
                                        <string>505.IBPluginDependency</string>
                                        <string>506.IBPluginDependency</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <reference ref="22221536"/>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                        <nil key="sourceID"/>
                        <int key="maxID">909</int>
                </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes"/>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">PithosPreferencesController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>addAccount:</string>
+                                                       <string>groupsApply:</string>
+                                                       <string>groupsRevert:</string>
+                                                       <string>login:</string>
+                                                       <string>loginCancel:</string>
+                                                       <string>removeAccount:</string>
+                                                       <string>syncApply:</string>
+                                                       <string>syncCancel:</string>
+                                                       <string>syncRefresh:</string>
+                                               </object>
+                                               <object class="NSArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="actionInfosByName">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>addAccount:</string>
+                                                       <string>groupsApply:</string>
+                                                       <string>groupsRevert:</string>
+                                                       <string>login:</string>
+                                                       <string>loginCancel:</string>
+                                                       <string>removeAccount:</string>
+                                                       <string>syncApply:</string>
+                                                       <string>syncCancel:</string>
+                                                       <string>syncRefresh:</string>
+                                               </object>
+                                               <object class="NSArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">addAccount:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">groupsApply:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">groupsRevert:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">login:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">loginCancel:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">removeAccount:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">syncApply:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">syncCancel:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">syncRefresh:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>accountsArrayController</string>
+                                                       <string>groupsDictionaryController</string>
+                                                       <string>selectedGroupMembersDictionaryController</string>
+                                                       <string>syncAccountsOutlineView</string>
+                                               </object>
+                                               <object class="NSArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSArrayController</string>
+                                                       <string>NSDictionaryController</string>
+                                                       <string>NSDictionaryController</string>
+                                                       <string>NSOutlineView</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>accountsArrayController</string>
+                                                       <string>groupsDictionaryController</string>
+                                                       <string>selectedGroupMembersDictionaryController</string>
+                                                       <string>syncAccountsOutlineView</string>
+                                               </object>
+                                               <object class="NSArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">accountsArrayController</string>
+                                                               <string key="candidateClassName">NSArrayController</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">groupsDictionaryController</string>
+                                                               <string key="candidateClassName">NSDictionaryController</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">selectedGroupMembersDictionaryController</string>
+                                                               <string key="candidateClassName">NSDictionaryController</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">syncAccountsOutlineView</string>
+                                                               <string key="candidateClassName">NSOutlineView</string>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">./Classes/PithosPreferencesController.h</string>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
                <int key="IBDocument.localizationMode">0</int>
                <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
                <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
index c48dd89..6b0199b 100644 (file)
@@ -49,6 +49,7 @@
     
     BOOL isPublic;
     NSString *translatedModifiedBy;
+    NSMutableArray *translatedPermissions;
     
     BOOL refreshParent;
 }
@@ -61,6 +62,7 @@
 @property (nonatomic, strong) NSArray *versions;
 @property (nonatomic, assign) BOOL isPublic;
 @property (nonatomic, strong) NSString *translatedModifiedBy;
+@property (nonatomic, strong) NSMutableArray *translatedPermissions;
 
 - (void)applyInfo;
 - (void)refreshInfo;
index 46e52ce..993d627 100644 (file)
@@ -41,6 +41,7 @@
 #import "ASIPithosObjectRequest.h"
 #import "ASIPithosContainer.h"
 #import "ASIPithosObject.h"
+#import "ASIPithosSharingUser.h"
 #import "ASINetworkQueue.h"
 #import "ASIDownloadCache.h"
 #import "PithosAccount.h"
@@ -51,7 +52,7 @@ static NSImage *sharedIcon = nil;
 
 @implementation PithosSubdirNode
 @synthesize pithosObject, versions;
-@synthesize isPublic, translatedModifiedBy;
+@synthesize isPublic, translatedModifiedBy, translatedPermissions;
 
 + (void)initialize {
        if (self == [PithosSubdirNode class])
@@ -85,18 +86,42 @@ static NSImage *sharedIcon = nil;
 - (void)updateModifiedBy {
     if (!pithosObject.modifiedBy) {
         self.translatedModifiedBy = nil;
-    } else {
-        if (pithosAccountManager) {
-            NSString *displayname = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:NO];
-            if (displayname) {
-                self.translatedModifiedBy = displayname;
-            } else {
-                [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:pithosObject.modifiedBy]];
-                self.translatedModifiedBy = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:YES];
-            }
+    } else if (pithosAccountManager) {
+        NSString *displayname = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:NO];
+        if (displayname) {
+            self.translatedModifiedBy = displayname;
         } else {
-            self.translatedModifiedBy = [pithosObject.modifiedBy copy];
+            [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:pithosObject.modifiedBy]];
+            self.translatedModifiedBy = [pithosAccountManager displaynameForUUID:pithosObject.modifiedBy safe:YES];
         }
+    } else {
+        self.translatedModifiedBy = [pithosObject.modifiedBy copy];
+    }
+}
+
+- (void)updatePermissions {
+    if (!pithosObject) {
+        self.translatedPermissions = [NSMutableArray array];
+    } else if (pithosAccountManager) {
+        NSMutableSet *UUIDs = [NSMutableSet set];
+        for (ASIPithosSharingUser *sharingUser in pithosObject.permissions) {
+            [UUIDs addObject:sharingUser.name];
+        }
+        [UUIDs removeObject:@""];
+        [UUIDs removeObject:@"*"];
+        if (UUIDs.count) {
+            [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:[UUIDs allObjects]];
+        }
+        
+        NSMutableArray *newTranslatedPermissions = [NSMutableArray arrayWithCapacity:pithosObject.permissions.count];
+        for (ASIPithosSharingUser *sharingUser in pithosObject.permissions) {
+            ASIPithosSharingUser *translatedSharingUser = [sharingUser copy];
+            translatedSharingUser.name = [pithosAccountManager displaynameForUUID:translatedSharingUser.name safe:YES];
+            [newTranslatedPermissions addObject:translatedSharingUser];
+        }
+        self.translatedPermissions = newTranslatedPermissions;
+    } else {
+        self.translatedPermissions = [NSMutableArray arrayWithArray:[pithosObject.permissions copy]];
     }
 }
 
@@ -141,13 +166,14 @@ static NSImage *sharedIcon = nil;
 - (void)setPithosObject:(ASIPithosObject *)aPithosObject {
     if (![pithosObject isEqualTo:aPithosObject]) {
         pithosObject = aPithosObject;
+        [self updateModifiedBy];
+        [self updatePermissions];
     }
     if (pithosObject.subdir) {
         self.prefix = [pithosObject.name substringToIndex:([pithosObject.name length] - 1)];
     } else {
         self.prefix = [NSString stringWithString:pithosObject.name];
     }
-    [self updateModifiedBy];
     self.isPublic = (pithosObject.publicURI != nil);
     // Refresh browser if the object is in my shared and is no longer shared
     if (shared && !pithosObject.subdir && !pithosObject.sharing) {
@@ -174,6 +200,7 @@ static NSImage *sharedIcon = nil;
             self.pithosObject.sharing = aPithosObject.sharing;
             self.pithosObject.publicURI = aPithosObject.publicURI;
             self.pithosObject = pithosObject;
+            [self updatePermissions];
         } else {
             [self updateModifiedBy];
         }
@@ -274,11 +301,7 @@ static NSImage *sharedIcon = nil;
                                                                                                objectName:prefix];
                 [PithosUtilities startAndWaitForRequest:request];
                 if ([request error]) {
-                    alert = [[NSAlert alloc] init];
-                    [alert setMessageText:@"HTTP Request Error"];
-                    [alert setInformativeText:[NSString stringWithFormat:@"An error occured: %@", [[request error] localizedDescription]]];
-                    [alert addButtonWithTitle:@"OK"];
-                    [alert runModal];
+                    [PithosUtilities httpRequestErrorAlertWithRequest:request];
                     return;
                 } else if (request.responseStatusCode == 200) {
                     alert = [[NSAlert alloc] init];
@@ -293,11 +316,7 @@ static NSImage *sharedIcon = nil;
                                                                              objectName:prefix];
                         [PithosUtilities startAndWaitForRequest:request];
                         if ([request error]) {
-                            alert = [[NSAlert alloc] init];
-                            [alert setMessageText:@"HTTP Request Error"];
-                            [alert setInformativeText:[NSString stringWithFormat:@"An error occured: %@", [[request error] localizedDescription]]];
-                            [alert addButtonWithTitle:@"OK"];
-                            [alert runModal];
+                            [PithosUtilities httpRequestErrorAlertWithRequest:request];
                             return;
                         } else if (request.responseStatusCode != 204) {
                             [PithosUtilities unexpectedResponseStatusAlertWithRequest:request];
@@ -316,6 +335,124 @@ static NSImage *sharedIcon = nil;
                 }
                 if (createObject) {
                     [[pithosNodeInfoController window] makeFirstResponder:nil];
+                    NSMutableArray *permissions = [NSMutableArray array];
+                    if (translatedPermissions.count) {
+                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                            if (translatedsSharingUser.group.length &&
+                                [translatedsSharingUser.group rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" -_~,;"]].location != NSNotFound) {
+                                NSAlert *alert = [[NSAlert alloc] init];
+                                [alert setMessageText:@"Invalid Input"];
+                                [alert setInformativeText:@"Group names cannot contain ' ', '-', '_', '~', ',' or ';'."];
+                                [alert addButtonWithTitle:@"OK"];
+                                [alert runModal];
+                                return;
+                            }
+                        }
+                        if (pithosAccountManager) {
+                            NSMutableSet *allUsers = [NSMutableSet set];
+                            for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                if (translatedsSharingUser.name.length) {
+                                    [allUsers addObject:translatedsSharingUser.name];
+                                }
+                            }
+                            [allUsers removeObject:@""];
+                            [allUsers removeObject:@"*"];
+                            if (allUsers.count) {
+                                ASIPithosRequest *userCatalogRequest = [pithosAccountManager updateUserCatalogForForDisplaynames:[allUsers allObjects]
+                                                                                                                           UUIDs:nil];
+                                if (userCatalogRequest.error || ((userCatalogRequest.responseStatusCode != 200) && (userCatalogRequest.responseStatusCode != 404))) {
+                                    return;
+                                } else if (userCatalogRequest.responseStatusCode == 200) {
+                                    // Check if all users exist.
+                                    NSDictionary *displaynameCatalog = [userCatalogRequest displaynameCatalog];
+                                    NSMutableArray *inexistentUsers = [NSMutableArray array];
+                                    for (NSString *user in allUsers) {
+                                        if (![displaynameCatalog objectForKey:user]) {
+                                            [inexistentUsers addObject:user];
+                                        }
+                                    }
+                                    if (!inexistentUsers.count) {
+                                        // Create permissions.
+                                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                            if (translatedsSharingUser.name.length) {
+                                                ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                                if (![sharingUser.name isEqualToString:@"*"]) {
+                                                    sharingUser.name = [displaynameCatalog objectForKey:sharingUser.name];
+                                                }
+                                                if (!sharingUser.permission) {
+                                                    sharingUser.permission = @"read";
+                                                }
+                                                [permissions addObject:sharingUser];
+                                            }
+                                        }
+                                    } else {
+                                        NSAlert *alert = [[NSAlert alloc] init];
+                                        if (inexistentUsers.count == 1) {
+                                            [alert setMessageText:@"Invalid User"];
+                                            [alert setInformativeText:[NSString stringWithFormat:@"User '%@' doesn't exist.", [inexistentUsers objectAtIndex:0]]];
+                                        } else {
+                                            [alert setMessageText:@"Invalid Users"];
+                                            [alert setInformativeText:[NSString stringWithFormat:@"Users '%@' don't exist.", [inexistentUsers componentsJoinedByString:@"', '"]]];
+                                        }
+                                        [alert addButtonWithTitle:@"OK"];
+                                        [alert runModal];
+                                        return;
+                                    }
+                                } else {
+                                    // 404. Since we don't translate to UUIDs, check for invalid chars.
+                                    BOOL valid = YES;
+                                    // Create permissions.
+                                    for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                        if (translatedsSharingUser.name.length &&
+                                            ([translatedsSharingUser.name rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" ~,;:"]].location != NSNotFound)) {
+                                            valid = NO;
+                                            break;
+                                        }
+                                    }
+                                    if (valid) {
+                                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                            if (translatedsSharingUser.name.length) {
+                                                ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                                if (!sharingUser.permission) {
+                                                    sharingUser.permission = @"read";
+                                                }
+                                                [permissions addObject:sharingUser];
+                                            }
+                                        }
+                                    } else {
+                                        NSAlert *alert = [[NSAlert alloc] init];
+                                        [alert setMessageText:@"Invalid Input"];
+                                        [alert setInformativeText:@"Users cannot contain ' ', '~', ',', ';' or ':'."];
+                                        [alert addButtonWithTitle:@"OK"];
+                                        [alert runModal];
+                                        return;
+                                    }
+                                }
+                            } else {
+                                for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                    if ([translatedsSharingUser.name isEqualToString:@"*"]) {
+                                        ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                        if (!sharingUser.permission) {
+                                            sharingUser.permission = @"read";
+                                        }
+                                        [permissions addObject:sharingUser];
+                                    }
+                                }
+                            }
+                        } else {
+                            for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                if (translatedsSharingUser.name.length) {
+                                    ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                    if (!sharingUser.permission) {
+                                        sharingUser.permission = @"read";
+                                    }
+                                    [permissions addObject:sharingUser];
+                                }
+                            }
+                        }
+                    }
+                    pithosObject.permissions = permissions;
+                    
                     applyMetadataObjectRequest = [ASIPithosObjectRequest writeObjectDataRequestWithPithos:pithos 
                                                                                              containerName:pithosContainer.name 
                                                                                                 objectName:prefix 
@@ -324,7 +461,7 @@ static NSImage *sharedIcon = nil;
                                                                                            contentEncoding:pithosObject.contentEncoding 
                                                                                         contentDisposition:pithosObject.contentDisposition 
                                                                                                   manifest:pithosObject.manifest 
-                                                                                                   sharing:pithosObject.sharing 
+                                                                                                   sharing:(pithosObject.sharing ? pithosObject.sharing : @"")
                                                                                                   isPublic:(isPublic ? ASIPithosObjectRequestPublicTrue : ASIPithosObjectRequestPublicFalse) 
                                                                                                   metadata:pithosObject.metadata 
                                                                                                       data:[NSData data]];
@@ -355,6 +492,124 @@ static NSImage *sharedIcon = nil;
                                                                                                          update:NO];
                     [applyMetadataObjectRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
                 } else {
+                    NSMutableArray *permissions = [NSMutableArray array];
+                    if (translatedPermissions.count) {
+                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                            if (translatedsSharingUser.group.length &&
+                                [translatedsSharingUser.group rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" -_~,;"]].location != NSNotFound) {
+                                NSAlert *alert = [[NSAlert alloc] init];
+                                [alert setMessageText:@"Invalid Input"];
+                                [alert setInformativeText:@"Group names cannot contain ' ', '-', '_', '~', ',' or ';'."];
+                                [alert addButtonWithTitle:@"OK"];
+                                [alert runModal];
+                                return;
+                            }
+                        }
+                        if (pithosAccountManager) {
+                            NSMutableSet *allUsers = [NSMutableSet set];
+                            for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                if (translatedsSharingUser.name.length) {
+                                    [allUsers addObject:translatedsSharingUser.name];
+                                }
+                            }
+                            [allUsers removeObject:@""];
+                            [allUsers removeObject:@"*"];
+                            if (allUsers.count) {
+                                ASIPithosRequest *userCatalogRequest = [pithosAccountManager updateUserCatalogForForDisplaynames:[allUsers allObjects]
+                                                                                                                           UUIDs:nil];
+                                if (userCatalogRequest.error || ((userCatalogRequest.responseStatusCode != 200) && (userCatalogRequest.responseStatusCode != 404))) {
+                                    return;
+                                } else if (userCatalogRequest.responseStatusCode == 200) {
+                                    // Check if all users exist.
+                                    NSDictionary *displaynameCatalog = [userCatalogRequest displaynameCatalog];
+                                    NSMutableArray *inexistentUsers = [NSMutableArray array];
+                                    for (NSString *user in allUsers) {
+                                        if (![displaynameCatalog objectForKey:user]) {
+                                            [inexistentUsers addObject:user];
+                                        }
+                                    }
+                                    if (!inexistentUsers.count) {
+                                        // Create permissions.
+                                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                            if (translatedsSharingUser.name.length) {
+                                                ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                                if (![sharingUser.name isEqualToString:@"*"]) {
+                                                    sharingUser.name = [displaynameCatalog objectForKey:sharingUser.name];
+                                                }
+                                                if (!sharingUser.permission) {
+                                                    sharingUser.permission = @"read";
+                                                }
+                                                [permissions addObject:sharingUser];
+                                            }
+                                        }
+                                    } else {
+                                        NSAlert *alert = [[NSAlert alloc] init];
+                                        if (inexistentUsers.count == 1) {
+                                            [alert setMessageText:@"Invalid User"];
+                                            [alert setInformativeText:[NSString stringWithFormat:@"User '%@' doesn't exist.", [inexistentUsers objectAtIndex:0]]];
+                                        } else {
+                                            [alert setMessageText:@"Invalid Users"];
+                                            [alert setInformativeText:[NSString stringWithFormat:@"Users '%@' don't exist.", [inexistentUsers componentsJoinedByString:@"', '"]]];
+                                        }
+                                        [alert addButtonWithTitle:@"OK"];
+                                        [alert runModal];
+                                        return;
+                                    }
+                                } else {
+                                    // 404. Since we don't translate to UUIDs, check for invalid chars.
+                                    BOOL valid = YES;
+                                    // Create permissions.
+                                    for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                        if (translatedsSharingUser.name.length &&
+                                            ([translatedsSharingUser.name rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@" ~,;:"]].location != NSNotFound)) {
+                                            valid = NO;
+                                            break;
+                                        }
+                                    }
+                                    if (valid) {
+                                        for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                            if (translatedsSharingUser.name.length) {
+                                                ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                                if (!sharingUser.permission) {
+                                                    sharingUser.permission = @"read";
+                                                }
+                                                [permissions addObject:sharingUser];
+                                            }
+                                        }
+                                    } else {
+                                        NSAlert *alert = [[NSAlert alloc] init];
+                                        [alert setMessageText:@"Invalid Input"];
+                                        [alert setInformativeText:@"Users cannot contain ' ', '~', ',', ';' or ':'."];
+                                        [alert addButtonWithTitle:@"OK"];
+                                        [alert runModal];
+                                        return;
+                                    }
+                                }
+                            } else {
+                                for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                    if ([translatedsSharingUser.name isEqualToString:@"*"]) {
+                                        ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                        if (!sharingUser.permission) {
+                                            sharingUser.permission = @"read";
+                                        }
+                                        [permissions addObject:sharingUser];
+                                    }
+                                }
+                            }
+                        } else {
+                            for (ASIPithosSharingUser *translatedsSharingUser in translatedPermissions) {
+                                if (translatedsSharingUser.name.length) {
+                                    ASIPithosSharingUser *sharingUser = [translatedsSharingUser copy];
+                                    if (!sharingUser.permission) {
+                                        sharingUser.permission = @"read";
+                                    }
+                                    [permissions addObject:sharingUser];
+                                }
+                            }
+                        }
+                    }
+                    pithosObject.permissions = permissions;
+
                     applyMetadataObjectRequest = [ASIPithosObjectRequest updateObjectMetadataRequestWithPithos:pithos 
                                                                                                   containerName:pithosContainer.name 
                                                                                                      objectName:pithosObject.name 
diff --git a/pithos-macos/SharingDictionaryTransformer.m b/pithos-macos/SharingDictionaryTransformer.m
deleted file mode 100644 (file)
index 3f84de3..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-//
-//  SharingDictionaryTransformer.m
-//  pithos-macos
-//
-// Copyright 2011 GRNET S.A. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or
-// without modification, are permitted provided that the following
-// conditions are met:
-// 
-//   1. Redistributions of source code must retain the above
-//      copyright notice, this list of conditions and the following
-//      disclaimer.
-// 
-//   2. Redistributions in binary form must reproduce the above
-//      copyright notice, this list of conditions and the following
-//      disclaimer in the documentation and/or other materials
-//      provided with the distribution.
-// 
-// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
-// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-// 
-// The views and conclusions contained in the software and
-// documentation are those of the authors and should not be
-// interpreted as representing official policies, either expressed
-// or implied, of GRNET S.A.
-
-#import "SharingDictionaryTransformer.h"
-
-@implementation SharingDictionaryTransformer
-
-+ (Class)transformedValueClass {
-       return [NSMutableDictionary class];
-}
-
-+ (BOOL)allowsReverseTransformation {
-       return YES;
-}
-
-- (id)transformedValue:(id)value {
-    NSMutableDictionary *sharingDictionary = [NSMutableDictionary dictionary];
-    
-    if (value == nil)
-        return sharingDictionary;
-    
-    NSRange readRange = [(NSString *)value rangeOfString:@"read=" options:NSCaseInsensitiveSearch];
-    NSUInteger readStart = readRange.location + readRange.length;
-    NSRange writeRange = [(NSString *)value rangeOfString:@"write=" options:NSCaseInsensitiveSearch];
-    NSUInteger writeStart = writeRange.location + writeRange.length;
-    if (writeRange.length == 0) {
-        if (readRange.length == 0) {
-            return sharingDictionary;
-        }
-        for (NSString *readUser in [[(NSString *)value substringFromIndex:readStart] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read only" forKey:readUser];
-        }
-    } else if (readRange.length == 0) {
-        for (NSString *writeUser in [[(NSString *)value substringFromIndex:writeStart] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read/write" forKey:writeUser];
-        }
-    } else if (readRange.location < writeRange.location) {
-        NSRange semicolonRange = [(NSString *)value rangeOfString:@";"];
-        for (NSString *readUser in [[(NSString *)value substringWithRange:NSMakeRange(readStart, semicolonRange.location - readStart)] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read only" forKey:readUser];
-        }
-        for (NSString *writeUser in [[(NSString *)value substringFromIndex:writeStart] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read/write" forKey:writeUser];
-        }        
-    } else {
-        NSRange semicolonRange = [(NSString *)value rangeOfString:@";"];
-        for (NSString *readUser in [[(NSString *)value substringFromIndex:readStart] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read only" forKey:readUser];
-        }                
-        for (NSString *writeUser in [[(NSString *)value substringWithRange:NSMakeRange(writeStart, semicolonRange.location - writeStart)] componentsSeparatedByString:@","]) {
-            [sharingDictionary setValue:@"read/write" forKey:writeUser];
-        }
-    }
-    
-    return sharingDictionary;
-}
-
-- (id)reverseTransformedValue:(id)value {
-    if ((value == nil) || ([(NSMutableDictionary *)value count] == 0))
-        return nil;
-    
-    NSString *readSharingString = nil;
-    NSArray *readUsers = [(NSMutableDictionary *)value allKeysForObject:@"read only"];
-    if ([readUsers count])
-        readSharingString = [NSString stringWithFormat:@"read=%@", [readUsers componentsJoinedByString:@","]];
-    NSString *writeSharingString = nil;
-    
-    NSArray *writeUsers = [(NSMutableDictionary *)value allKeysForObject:@"read/write"];
-    if ([writeUsers count])
-        writeSharingString = [NSString stringWithFormat:@"write=%@", [writeUsers componentsJoinedByString:@","]];
-        
-
-    if (readSharingString) {
-        if (writeSharingString) {
-            return [NSString stringWithFormat:@"%@;%@", readSharingString, writeSharingString];
-        }
-        return readSharingString;
-    } else {
-        return writeSharingString;
-    }
-}
-
-+ (void)initialize {
-    [[self class] setValueTransformer:[self new] forName:@"SharingDictionaryTransformer"];
-}
-
-@end
diff --git a/pithos-macos/SharingNameFormatter.m b/pithos-macos/SharingNameFormatter.m
deleted file mode 100644 (file)
index ed1636e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-//  SharingNameFormatter.m
-//  pithos-macos
-//
-// Copyright 2011 GRNET S.A. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or
-// without modification, are permitted provided that the following
-// conditions are met:
-// 
-//   1. Redistributions of source code must retain the above
-//      copyright notice, this list of conditions and the following
-//      disclaimer.
-// 
-//   2. Redistributions in binary form must reproduce the above
-//      copyright notice, this list of conditions and the following
-//      disclaimer in the documentation and/or other materials
-//      provided with the distribution.
-// 
-// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
-// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-// 
-// The views and conclusions contained in the software and
-// documentation are those of the authors and should not be
-// interpreted as representing official policies, either expressed
-// or implied, of GRNET S.A.
-
-#import "SharingNameFormatter.h"
-
-@implementation SharingNameFormatter
-
-- (NSString *)stringForObjectValue:(id)anObject {
-       if (anObject != nil)
-               return [NSString stringWithString:anObject];
-       return nil;
-}
-
-- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string errorDescription:(NSString **)error {
-       *anObject = [NSString stringWithString:string];
-       return YES;
-}
-
-- (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error {
-       if ([partialString length] == 0) {
-        *newString = nil;
-        return NO;
-    }
-    
-       unichar aChar;
-       for (int i = 0; i < [partialString length]; i++) {
-               aChar = [partialString characterAtIndex:i];
-               if ((aChar == ' ') || (aChar == '=') || (aChar == ',') || (aChar == ';')) {
-                       *newString = nil;
-                       return NO;
-               }
-       }
-    
-    return YES;
-}
-
-@end
@@ -1,8 +1,8 @@
 //
-//  SharingDictionaryTransformer.h
+//  SharingUserPermissionTransformer.h
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2013 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -35,5 +35,5 @@
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-@interface SharingDictionaryTransformer : NSValueTransformer
+@interface SharingUserPermissionTransformer : NSValueTransformer
 @end
similarity index 66%
rename from pithos-macos/SharingNameFormatter.h
rename to pithos-macos/SharingUserPermissionTransformer.m
index 80f025b..1d5a1a7 100644 (file)
@@ -1,8 +1,8 @@
 //
-//  SharingNameFormatter.h
+//  SharingUserPermissionTransformer.m
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2013 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-@interface SharingNameFormatter : NSFormatter
+#import "SharingUserPermissionTransformer.h"
+
+@implementation SharingUserPermissionTransformer
+
++ (Class)transformedValueClass {
+       return [NSString class];
+}
+
++ (BOOL)allowsReverseTransformation {
+       return YES;
+}
+
+- (id)transformedValue:(id)value {
+    if (value && [(NSString *)value isEqualToString:@"write"]) {
+        return @"Read/Write";
+    } else {
+        return @"Read Only";
+    }
+}
+
+- (id)reverseTransformedValue:(id)value {
+    if (value && [(NSString *)value isEqualToString:@"Read/Write"]) {
+        return @"write";
+    } else {
+        return @"read";
+    }
+}
+
++ (void)initialize {
+    [[self class] setValueTransformer:[self new] forName:@"SharingUserPermissionTransformer"];
+}
+
 @end