Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Show cancel option only with multiaccount available
Browse files Browse the repository at this point in the history
Update user in DB
  • Loading branch information
nasli committed Aug 3, 2017
1 parent b92b027 commit 4daf95e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions Owncloud iOs Client/Branding/Customization.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@

+(BOOL)kHideUrlServer;
+(BOOL)kForceUpdateOfServerUrl;
+(BOOL)kMultiaccountAvailable;
+(BOOL)kIsSsoActive;
+(BOOL)kIsTextLoginStatusBarWhite;
+(BOOL)kIsShownHelpLinkOnLogin;
Expand Down
4 changes: 4 additions & 0 deletions Owncloud iOs Client/Branding/Customization.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ +(BOOL)kForceUpdateOfServerUrl {
return k_force_update_of_server_url;
}

+(BOOL)kMultiaccountAvailable {
return k_multiaccount_available;
}

+(BOOL)kIsSsoActive {
return k_is_sso_active;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ connection_declined Connection declined by user
self.textFieldPassword.text = ""
} else {

if loginMode == .update {
if ( (Customization.kMultiaccountAvailable()
&& self.loginMode != .migrate
&& self.loginMode != .expire )
|| self.loginMode == .update) {

self.setCancelBarButtonSystemItem()
}

Expand Down Expand Up @@ -691,7 +695,7 @@ connection_declined Connection declined by user
} else {
ManageAccounts().updateAccountOfUser(self.user!, withCredentials: credentials)

self.closeLoginView()
self.closeLoginView()
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import Foundation

user.credDto = credDto.copy() as! CredentialsDto

ManageUsersDB.updateUser(by: user)

OCKeychain.updateCredentials(ofUser: user)

if user.activeaccount {
Expand Down

0 comments on commit 4daf95e

Please sign in to comment.