Browse files

Show notification before asking to logout

  • Loading branch information...
1 parent 37578c7 commit 98769849144a0f4f2334ad4902e38636d88d2a79 @viveksjain committed Dec 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Heracles/HeraclesAppDelegate.m
View
4 Heracles/HeraclesAppDelegate.m
@@ -138,7 +138,6 @@ - (IBAction)rightButtonClicked:(id)sender {
NSString *whitelist = [self getWhitelistURL];
BOOL chromeWhitelisted;
if ([self whitelistURL:whitelist isChromeWhitelisted:&chromeWhitelisted]) [[NSUserDefaults standardUserDefaults] setObject:whitelist forKey:@"whitelist"];
- if (chromeWhitelisted) [self alertToLogout];
if (firstRun) {
firstRun = NO;
@@ -147,6 +146,7 @@ - (IBAction)rightButtonClicked:(id)sender {
[self setStatus:@"" error:NO];
if (firstRun) message = [message stringByAppendingString:@" From now on Heracles will automatically obtain Kerberos tokens for you on login."];
[self notify:message];
+ if (chromeWhitelisted) [self alertToLogout];
[NSApp hide:nil];
}
}
@@ -459,7 +459,7 @@ - (NSString *)authenticateWithUsername:(NSString *)usernameToUse withPassword:(N
exitAfterNotify = NO;
realmName = nil;
- NSDictionary *prefs=[[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.loginwindow"];
+ NSDictionary *prefs = [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.loginwindow"];
if ([prefs objectForKey:@"autoLoginUser"] != nil) return @"Automatic login is enabled. You can disable it in System Preferences → Security & Privacy → General → Disable automatic login.";
if (usernameToUse == nil) usernameToUse = username;

0 comments on commit 9876984

Please sign in to comment.