aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManagerDelegate.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-11-18 00:14:52 +0100
committerMax <post@wickenrode.com>2015-11-18 00:14:52 +0100
commitdfe9c477aac50a859e283e0eb6316682458e3e39 (patch)
tree400ab62a643c398e752aecf291fdefe1d0a90db0 /Source/SPUserManagerDelegate.m
parent1f7684a8d075a77914301aea444e2a244347249d (diff)
downloadsequelpro-dfe9c477aac50a859e283e0eb6316682458e3e39.tar.gz
sequelpro-dfe9c477aac50a859e283e0eb6316682458e3e39.tar.bz2
sequelpro-dfe9c477aac50a859e283e0eb6316682458e3e39.zip
* Remove restriction on 16 chars for username in User Manager (#1886)
* Change user manager code so that mysql queries are executed on validation instead of after save (in Core Data, not mysql). This should in general make more sense since a failure in MySQL essentialy means that Core Data can't save it either (but did anyway in the past). * Remove a deprecated method call that is no longer needed in 10.6+
Diffstat (limited to 'Source/SPUserManagerDelegate.m')
-rw-r--r--Source/SPUserManagerDelegate.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/SPUserManagerDelegate.m b/Source/SPUserManagerDelegate.m
index ac9e0675..cefe7f2e 100644
--- a/Source/SPUserManagerDelegate.m
+++ b/Source/SPUserManagerDelegate.m
@@ -65,7 +65,7 @@ static NSString *SPSchemaPrivilegesTabIdentifier = @"Schema Privileges";
[self _initializeAvailablePrivs];
if ([[treeController selectedObjects] count] > 0 && [[schemasTableView selectedRowIndexes] count] > 0) {
- NSManagedObject *user = [[treeController selectedObjects] objectAtIndex:0];
+ SPUserMO *user = [[treeController selectedObjects] objectAtIndex:0];
// Check to see if the user host node was selected
if ([user valueForKey:@"host"]) {
@@ -127,7 +127,7 @@ static NSString *SPSchemaPrivilegesTabIdentifier = @"Schema Privileges";
// If the schema has permissions set, highlight with a yellow background
BOOL enabledPermissions = NO;
- NSManagedObject *user = [[treeController selectedObjects] objectAtIndex:0];
+ SPUserMO *user = [[treeController selectedObjects] objectAtIndex:0];
NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"]
schema:[schemaName stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]
host:[user valueForKey:@"host"]];
@@ -233,9 +233,8 @@ static NSString *SPSchemaPrivilegesTabIdentifier = @"Schema Privileges";
if ([cell isKindOfClass:[ImageAndTextCell class]])
{
// Determines which Image to display depending on parent or child object
- NSImage *image = [[NSImage imageNamed:[(NSManagedObject *)[item representedObject] parent] ? NSImageNameNetwork : NSImageNameUser] retain];
+ NSImage *image = [[NSImage imageNamed:[(SPUserMO *)[item representedObject] parent] ? NSImageNameNetwork : NSImageNameUser] retain];
- [image setScalesWhenResized:YES];
[image setSize:(NSSize){16, 16}];
[(ImageAndTextCell *)cell setImage:image];
[image release];