| | |
| | | * @return true if the user service supports credential changes |
| | | */ |
| | | public boolean supportsCredentialChanges(UserModel user) { |
| | | return (user != null && user.isLocalAccount()) || userService.supportsCredentialChanges(); |
| | | if (user == null) { |
| | | return false; |
| | | } else if (!Constants.EXTERNAL_ACCOUNT.equals(user.password)) { |
| | | // credentials likely maintained by Gitblit |
| | | return userService.supportsCredentialChanges(); |
| | | } else { |
| | | // credentials are externally maintained |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if (userService == null) { |
| | | return; |
| | | } |
| | | if (userService.supportsCookies()) { |
| | | GitBlitWebSession session = GitBlitWebSession.get(); |
| | | boolean standardLogin = session.authenticationType.isStandard(); |
| | | |
| | | if (userService.supportsCookies() && standardLogin) { |
| | | Cookie userCookie; |
| | | if (user == null) { |
| | | // clear cookie for logout |