- Timestamp:
- 04/16/19 10:41:54 (5 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/Actions.java
r1314 r1316 111 111 */ 112 112 public static void ToggleBay() throws KeyStoreException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, ClassNotFoundException, SQLException, IOException, ParseException { 113 if (!AuthenticatorBrowser.isAuthenticated()) return; 113 114 if (!DisplayController.isMailMode()) { 114 115 MailBay.ensureLink(); … … 160 161 Map<AuthenticationTag, String> userData = userdata.get(); 161 162 162 // A profile already existing with 'username' means an account cannot be created with that username. 163 if (FrameIO. LoadProfile(userData.get(AuthenticationTag.Username)) != null) {163 // A profile already existing with 'username' means an account cannot be created with that username. 164 if (FrameIO.getProfilesList().contains(userData.get(AuthenticationTag.Username))) { 164 165 MessageBay.errorMessage(Constants.ERROR_PROFILE_NAME_PREEXISTS); 165 166 return; -
trunk/src/org/expeditee/auth/account/Authenticate.java
r1314 r1316 59 59 personalKey = AuthenticatorBrowser.getInstance().getSecretKey(username, password); 60 60 } catch (Exception e) { 61 return AuthenticationResult.ErrorLoginUsernamePasswordCombo; 62 } 63 64 if (personalKey == null) { 61 65 return AuthenticationResult.ErrorLoginUsernamePasswordCombo; 62 66 } -
trunk/src/org/expeditee/gui/FrameIO.java
r1303 r1316 376 376 List<String> directoriesToSearch = FolderSettings.FrameDirs.getAbsoluteDirs(); 377 377 378 if (AuthenticatorBrowser.Authenticated) {379 // if we are running Expeditee Authenticated, consult user profile as location for framesets first380 String profilePath = FrameIO.PROFILE_PATH + UserSettings.UserName.get() + File.separator;381 directoriesToSearch.add(0, profilePath);382 }378 // if (AuthenticatorBrowser.Authenticated) { 379 // // if we are running Expeditee Authenticated, consult user profile as location for framesets first 380 // String profilePath = FrameIO.PROFILE_PATH + UserSettings.UserName.get() + File.separator; 381 // directoriesToSearch.add(0, profilePath); 382 // } 383 383 384 384 for (String path : directoriesToSearch) { … … 425 425 list.deleteCharAt(list.length() - 1); 426 426 return list.toString(); 427 } 428 429 /** 430 * Gets a list of all the profiles available to the user 431 * 432 * @return a list containing all the available framesets on separate lines 433 */ 434 public static List<String> getProfilesList() { 435 List<File> potentialProfiles = Arrays.asList(new File(FrameIO.PROFILE_PATH).listFiles()); 436 potentialProfiles.removeIf(file -> !file.isDirectory()); 437 return potentialProfiles.stream().map(dir -> dir.getName()).collect(Collectors.toList()); 427 438 } 428 439
Note:
See TracChangeset
for help on using the changeset viewer.