コード例 #1
0
ファイル: AlertController.py プロジェクト: ygini/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     '''Called when the forced logout warning alert ends'''
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         msclog.log("user", "install_with_logout")
         self.handlePossibleAuthRestart()
         try:
             munki.logoutAndUpdate()
         except munki.ProcessStartError, err:
             self.installSessionErrorAlert_(err)
コード例 #2
0
ファイル: AlertController.py プロジェクト: SteveKueng/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     '''Called when the forced logout warning alert ends'''
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         msclog.log("user", "install_with_logout")
         self.handlePossibleAuthRestart()
         try:
             munki.logoutAndUpdate()
         except munki.ProcessStartError, err:
             self.installSessionErrorAlert_(err)
コード例 #3
0
ファイル: MSUAppDelegate.py プロジェクト: rcuza/munki
 def logoutAlertDidEnd_returnCode_contextInfo_(self, alert, returncode, contextinfo):
     if returncode == 0:
         NSLog("User cancelled")
         munki.log("user", "cancelled")
     elif returncode == 1:
         NSLog("User chose to log out")
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
         if result:
             self.installSessionErrorAlert()
     elif returncode == -1:
         # dismiss the alert sheet now because we might display
         # another alert
         alert.window().orderOut_(self)
         if self.alertIfBlockingAppsRunning():
             pass
         else:
             NSLog("User chose to update without logging out")
             munki.log("user", "install_without_logout")
             result = munki.justUpdate()
             if result:
                 self.installSessionErrorAlert()
             else:
                 self.managedsoftwareupdate_task = "installwithnologout"
                 self.mainWindowController.theWindow.orderOut_(self)
                 self.munkiStatusController.window.makeKeyAndOrderFront_(self)
                 self.munkiStatusController.startMunkiStatusSession()
コード例 #4
0
ファイル: MSUAppDelegate.py プロジェクト: cooljeanius/munki
 def logoutAlertDidEnd_returnCode_contextInfo_(self, alert, returncode,
                                               contextinfo):
     self._currentAlert = None
     if returncode == NSAlertDefaultReturn:
         if self.alertIfRunnningOnBattery():
             munki.log("user", "alerted_on_battery_power_and_cancelled")
             return
         NSLog("User chose to logout")
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
         if result:
             self.installSessionErrorAlert()
     elif returncode == NSAlertAlternateReturn:
         NSLog("User cancelled")
         munki.log("user", "cancelled")
     elif returncode == NSAlertOtherReturn:
         # dismiss the alert sheet now because we might display
         # another alert
         alert.window().orderOut_(self)
         if self.alertIfBlockingAppsRunning():
             return
         if self.alertIfRunnningOnBattery():
             munki.log("user", "alerted_on_battery_power_and_cancelled")
             return
         NSLog("User chose to update without logging out")
         munki.log("user", "install_without_logout")
         result = munki.justUpdate()
         if result:
             self.installSessionErrorAlert()
         else:
             self.managedsoftwareupdate_task = "installwithnologout"
             self.mainWindowController.theWindow.orderOut_(self)
             self.munkiStatusController.window.makeKeyAndOrderFront_(self)
             self.munkiStatusController.startMunkiStatusSession()
コード例 #5
0
 def logoutAlertDidEnd_returnCode_contextInfo_(
                                     self, alert, returncode, contextinfo):
     self._currentAlert = None
     if returncode == NSAlertDefaultReturn:
         if self.alertIfRunnningOnBattery():
             munki.log("user", "alerted_on_battery_power_and_cancelled")
             return
         NSLog("User chose to logout")
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
         if result:
             self.installSessionErrorAlert()
     elif returncode == NSAlertAlternateReturn:
         NSLog("User cancelled")
         munki.log("user", "cancelled")
     elif returncode == NSAlertOtherReturn:
         # dismiss the alert sheet now because we might display
         # another alert
         alert.window().orderOut_(self)
         if self.alertIfBlockingAppsRunning():
             return
         if self.alertIfRunnningOnBattery():
             munki.log("user", "alerted_on_battery_power_and_cancelled")
             return
         NSLog("User chose to update without logging out")
         munki.log("user", "install_without_logout")
         result = munki.justUpdate()
         if result:
             self.installSessionErrorAlert()
         else:
             self.managedsoftwareupdate_task = "installwithnologout"
             self.mainWindowController.theWindow.orderOut_(self)
             self.munkiStatusController.window.makeKeyAndOrderFront_(self)
             self.munkiStatusController.startMunkiStatusSession()
コード例 #6
0
ファイル: AlertController.py プロジェクト: LTSAdmin/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
                                     self, alert, returncode, contextinfo):
     '''Called when the forced logout warning alert ends'''
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         msclog.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     elif btn_pressed == self._force_warning_ok_btn:
         msclog.log("user", "dismissed_forced_logout_warning")
コード例 #7
0
ファイル: MSUAppDelegate.py プロジェクト: cooljeanius/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     self._currentAlert = None
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     elif btn_pressed == self._force_warning_ok_btn:
         munki.log("user", "dismissed_forced_logout_warning")
コード例 #8
0
ファイル: AlertController.py プロジェクト: smusa/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     '''Called when the forced logout warning alert ends'''
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         msclog.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     elif btn_pressed == self._force_warning_ok_btn:
         msclog.log("user", "dismissed_forced_logout_warning")
コード例 #9
0
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
                                     self, alert, returncode, contextinfo):
     self._currentAlert = None
     btn_pressed = self._force_warning_btns.get(returncode)
     if btn_pressed == self._force_warning_logout_btn:
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     elif btn_pressed == self._force_warning_ok_btn:
         munki.log("user", "dismissed_forced_logout_warning")
コード例 #10
0
ファイル: AlertController.py プロジェクト: ygini/munki
 def logoutAlertDidEnd_returnCode_contextInfo_(self, alert, returncode,
                                               contextinfo):
     '''Called when logout alert ends'''
     if returncode == NSAlertDefaultReturn:
         # make sure this alert panel is gone before we proceed, which
         # might involve opening another alert sheet
         alert.window().orderOut_(self)
         if self.alertedToFirmwareUpdatesAndCancelled():
             msclog.log("user", "alerted_to_firmware_updates_and_cancelled")
             return
         elif self.alertedToRunningOnBatteryAndCancelled():
             msclog.log("user", "alerted_on_battery_power_and_cancelled")
             return
         msclog.log("user", "install_with_logout")
         self.handlePossibleAuthRestart()
         try:
             munki.logoutAndUpdate()
         except munki.ProcessStartError, err:
             self.installSessionErrorAlert_(err)
コード例 #11
0
ファイル: AlertController.py プロジェクト: SteveKueng/munki
 def logoutAlertDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     '''Called when logout alert ends'''
     if returncode == NSAlertDefaultReturn:
         # make sure this alert panel is gone before we proceed, which
         # might involve opening another alert sheet
         alert.window().orderOut_(self)
         if self.alertedToFirmwareUpdatesAndCancelled():
             msclog.log("user", "alerted_to_firmware_updates_and_cancelled")
             return
         elif self.alertedToRunningOnBatteryAndCancelled():
             msclog.log("user", "alerted_on_battery_power_and_cancelled")
             return
         msclog.log("user", "install_with_logout")
         self.handlePossibleAuthRestart()
         try:
             munki.logoutAndUpdate()
         except munki.ProcessStartError, err:
             self.installSessionErrorAlert_(err)
コード例 #12
0
ファイル: MSUAppDelegate.py プロジェクト: zdw/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(self, alert, returncode, contextinfo):
     self._currentAlert = None
     btn_pressed = self._force_warning_btns.get(returncode)
     if not btn_pressed:
         # sheet was dismissed via NSApp.endSheet()
         # and not via button press, so do nothing
         pass
     elif btn_pressed == self._force_warning_logout_btn:
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     else:
         munki.log("user", "dismissed_forced_logout_warning")
コード例 #13
0
ファイル: MSUAppDelegate.py プロジェクト: zdw/munki
 def forceLogoutWarningDidEnd_returnCode_contextInfo_(
         self, alert, returncode, contextinfo):
     self._currentAlert = None
     btn_pressed = self._force_warning_btns.get(returncode)
     if not btn_pressed:
         # sheet was dismissed via NSApp.endSheet()
         # and not via button press, so do nothing
         pass
     elif btn_pressed == self._force_warning_logout_btn:
         munki.log("user", "install_with_logout")
         result = munki.logoutAndUpdate()
     else:
         munki.log("user", "dismissed_forced_logout_warning")