aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/UserManagerView.xib52
-rw-r--r--Source/SPUserManager.m20
2 files changed, 48 insertions, 24 deletions
diff --git a/Interfaces/English.lproj/UserManagerView.xib b/Interfaces/English.lproj/UserManagerView.xib
index 32840b71..a7619996 100644
--- a/Interfaces/English.lproj/UserManagerView.xib
+++ b/Interfaces/English.lproj/UserManagerView.xib
@@ -3690,22 +3690,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
- <string key="label">contentArray: grantedSchemaPrivs</string>
- <reference key="source" ref="794463874"/>
- <reference key="destination" ref="1001"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="794463874"/>
- <reference key="NSDestination" ref="1001"/>
- <string key="NSLabel">contentArray: grantedSchemaPrivs</string>
- <string key="NSBinding">contentArray</string>
- <string key="NSKeyPath">grantedSchemaPrivs</string>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">800</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
<string key="label">value: arrangedObjects.Database</string>
<reference key="source" ref="919609640"/>
<reference key="destination" ref="468815722"/>
@@ -4080,6 +4064,26 @@
</object>
<int key="connectionID">928</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">contentArray: grantedSchemaPrivs</string>
+ <reference key="source" ref="794463874"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="794463874"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">contentArray: grantedSchemaPrivs</string>
+ <string key="NSBinding">contentArray</string>
+ <string key="NSKeyPath">grantedSchemaPrivs</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSDeletesObjectsOnRemove</string>
+ <boolean value="YES" key="NS.object.0"/>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">929</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -5675,7 +5679,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">928</int>
+ <int key="maxID">929</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -6346,6 +6350,20 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">PSMTabBar.framework/Headers/PSMTabBarCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">PSMTabBar.framework/Headers/PSMTabBarControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Sparkle.framework/Headers/SUAppcast.h</string>
</object>
</object>
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 4e27b407..48446d22 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -357,7 +357,10 @@
key = [privColumnToGrantMap objectForKey:key];
}
[dbPriv setValue:[NSNumber numberWithBool:boolValue] forKey:key];
- } else if (![key isEqualToString:@"Host"] && ![key isEqualToString:@"User"]) {
+ } else if ([key isEqualToString:@"Db"]) {
+ [dbPriv setValue:[[rowDict objectForKey:key] stringByReplacingOccurrencesOfString:@"\\_" withString:@"_"]
+ forKey:key];
+ } else if (![key isEqualToString:@"Host"] && ![key isEqualToString:@"User"]) {
[dbPriv setValue:[rowDict objectForKey:key] forKey:key];
}
}
@@ -760,7 +763,8 @@
}
[self.managedObjectContext reset];
- [grantedSchemaPrivs removeAllObjects];
+ [grantedSchemaPrivs removeAllObjects];
+ //[grantedController fetch:nil];
[grantedTableView reloadData];
[self _initializeAvailablePrivs];
[treeController fetch:nil];
@@ -773,8 +777,8 @@
NSArray *userArray = [self.managedObjectContext executeFetchRequest:request error:nil];
for (NSManagedObject *user in userArray) {
if (![user parent]) {
- [user setValue:[user valueForKey:@"user"] forKey:@"originaluser"];
- [user setValue:[user valueForKey:@"password"] forKey:@"originalpassword"];
+ [user setPrimitiveValue:[user valueForKey:@"user"] forKey:@"originaluser"];
+ [user setPrimitiveValue:[user valueForKey:@"password"] forKey:@"originalpassword"];
}
}
}
@@ -786,11 +790,12 @@
NSManagedObject *selectedHost = [[treeController selectedObjects] objectAtIndex:0];
NSString *selectedDb = [[[schemaController selectedObjects] objectAtIndex:0] valueForKey:@"Database"];
NSArray *selectedPrivs = [self _fetchPrivsWithUser:[selectedHost valueForKeyPath:@"parent.user"]
- schema:selectedDb
+ schema:[selectedDb stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]
host:[selectedHost valueForKey:@"host"]];
NSManagedObject *priv = nil;
BOOL isNew = FALSE;
+
if ([selectedPrivs count] > 0)
{
priv = [selectedPrivs objectAtIndex:0];
@@ -1377,8 +1382,9 @@
// Check to see if the user host node was selected
if ([user valueForKey:@"host"]) {
NSString *selectedSchema = [[[schemaController selectedObjects] objectAtIndex:0] valueForKey:@"Database"];
- selectedSchema = [selectedSchema stringByReplacingOccurrencesOfString:@"_" withString:@"\\\\_"];
- NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"] schema:selectedSchema host:[user valueForKey:@"host"]];
+ NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"]
+ schema:[selectedSchema stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]
+ host:[user valueForKey:@"host"]];
if ([results count] > 0) {
NSManagedObject *priv = [results objectAtIndex:0];