From 9f9257f358d46f08c7fe910a859600e4dd134c22 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 17 Feb 2017 01:34:05 -0500 Subject: [PATCH] Force use of username/password, simplify login process - Login jumps directly to Directory Editor --- src/main/java/Login.java | 2 +- src/main/java/LoginController.java | 38 ++++++---------------------- src/main/resources/LoginDisplay.fxml | 7 ----- 3 files changed, 9 insertions(+), 38 deletions(-) diff --git a/src/main/java/Login.java b/src/main/java/Login.java index 058e8a2..46c6fd4 100644 --- a/src/main/java/Login.java +++ b/src/main/java/Login.java @@ -17,7 +17,7 @@ public class Login { Login(){ System.out.println("login made"); passwordAuthentication = new PasswordAuthentication(uname, charPassword); - requiredSignin = false; //change to true after development and when testing + requiredSignin = true; //change to true after development and when testing isSignedIn = false; } diff --git a/src/main/java/LoginController.java b/src/main/java/LoginController.java index 70e6c4a..5df5268 100644 --- a/src/main/java/LoginController.java +++ b/src/main/java/LoginController.java @@ -16,8 +16,6 @@ public class LoginController { @FXML private Label labelWrongCreds; @FXML private AnchorPane loginPage; @FXML private Button loginButton; - @FXML private AnchorPane adminPane; - private String inputPassword = ""; @@ -36,20 +34,16 @@ private boolean getCredentials(){ return login.signIn(textboxUsername.getText(), passwordBox.getText()); } - public void signInMap(){ - stage.setHeight(650); - stage.setWidth(600); - if (getCredentials()) { - stage.hide(); - applicationController.createMapAdminDisplay(login); - } else { - passwordBox.clear(); - labelWrongCreds.setVisible(true); - } + public void isSelected(){ //for auto-disapearing + labelWrongCreds.setVisible(false); } - public void signInDirectory(){ - if (getCredentials()){ + /** + * Displays options for map and directory admin + */ + public void showAdminMenu(){ + if (getCredentials()) { + loginPage.setVisible(false); stage.hide(); applicationController.createDirectoryAdminDisplay(login); } else { @@ -57,20 +51,4 @@ public void signInDirectory(){ labelWrongCreds.setVisible(true); } } - - - public void isSelected(){ //for auto-disapearing - labelWrongCreds.setVisible(false); - } - - /** - * Displays options for map and directory admin - */ - public void showAdminMenu(){ - loginPage.setVisible(false); - adminPane.setVisible(true); - stage.setHeight(500); - stage.setWidth(900); - stage.centerOnScreen(); - } } diff --git a/src/main/resources/LoginDisplay.fxml b/src/main/resources/LoginDisplay.fxml index 9b94496..bf33b66 100644 --- a/src/main/resources/LoginDisplay.fxml +++ b/src/main/resources/LoginDisplay.fxml @@ -20,13 +20,6 @@ - - - -