Skip to content

Commit

Permalink
fixed enabing window state with AD
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Jan 14, 2024
1 parent b4ffa8f commit 24d17c9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Profile Manifest/com.twocanoes.xcreds.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>pfm_app_url</key>
<string>https://github.com/twocanoes/xcreds</string>
<key>pfm_description</key>
<string>XCreds 4.0 (6233) OAuth Settings</string>
<string>XCreds 4.0 (6234) OAuth Settings</string>
<key>pfm_documentation_url</key>
<string>https://twocanoes.com/knowledge-base/xcreds-admin-guide/#preferences</string>
<key>pfm_domain</key>
Expand Down
20 changes: 11 additions & 9 deletions XCredsLoginPlugIn/LoginWindow/SignInWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,17 @@ protocol UpdateCredentialsFeedbackProtocol {
passwordTextField.shake(self)
alertTextField.isHidden=false
alertTextField.stringValue = message ?? "Authentication Failed"
loginStartedUI()
setLoginWindowState(enabled: true)
}

/// Simple toggle to change the state of the NoLo window UI between active and inactive.
fileprivate func loginStartedUI() {
fileprivate func setLoginWindowState(enabled:Bool) {
TCSLogWithMark()
signIn.isEnabled = !signIn.isEnabled
signIn.isEnabled = enabled
TCSLogWithMark()
usernameTextField.isEnabled = !usernameTextField.isEnabled
passwordTextField.isEnabled = !passwordTextField.isEnabled
localOnlyCheckBox.isEnabled = !localOnlyCheckBox.isEnabled
usernameTextField.isEnabled = enabled
passwordTextField.isEnabled = enabled
localOnlyCheckBox.isEnabled = enabled

TCSLogWithMark()
}
Expand Down Expand Up @@ -278,7 +278,8 @@ protocol UpdateCredentialsFeedbackProtocol {
TCSLogWithMark("No password entered")
return
}
loginStartedUI()
setLoginWindowState(enabled: false)

TCSLogWithMark()
updateLoginWindowInfo()
TCSLogWithMark()
Expand Down Expand Up @@ -761,7 +762,8 @@ extension SignInViewController: NoMADUserSessionDelegate {
let res = showResetUI()

if res == false { //user cancelled so enable UI
loginStartedUI()
setLoginWindowState(enabled: true)

}
return
case .OffDomain:
Expand All @@ -778,7 +780,7 @@ extension SignInViewController: NoMADUserSessionDelegate {

default:
TCSLogErrorWithMark("NoMAD Login Authentication failed with: \(description)")
loginStartedUI()
// loginStartedUI()
authFail(description)
//
return
Expand Down
12 changes: 6 additions & 6 deletions xCreds.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1473,7 +1473,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1594,7 +1594,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1631,7 +1631,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1781,7 +1781,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1823,7 +1823,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 6233;
CURRENT_PROJECT_VERSION = 6239;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<key>auth_mech_fixup.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
<integer>7</integer>
</dict>
<key>authrights.xcscheme_^#shared#^_</key>
<dict>
Expand All @@ -42,7 +42,7 @@
<key>test.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>8</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down

0 comments on commit 24d17c9

Please sign in to comment.