Changeset 1287 for trunk


Ignore:
Timestamp:
04/05/19 13:21:26 (5 years ago)
Author:
bln4
Message:

Updated VM property auth to expeditee.authentication.
Added two static functions to AuthenticationBrowser to help with the language used to determine if a user is authenticated (isAuthenticated and isAuthenticationRequired)

Location:
trunk/src/org/expeditee
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/AuthenticatorBrowser.java

    r1282 r1287  
    9090        }
    9191       
     92        public static boolean isAuthenticationRequired() {
     93                return Boolean.getBoolean("expeditee.authentication");
     94        }
     95       
     96        public static boolean isAuthenticated() {
     97                return isAuthenticationRequired() && !UserSettings.UserName.get().equals(Browser.USER_NOBODY);
     98        }
     99       
    92100        private AuthenticatorBrowser() throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException, ClassNotFoundException, SQLException {
    93101                super("Authentication");
  • trunk/src/org/expeditee/gui/Browser.java

    r1282 r1287  
    165165         */
    166166        public static void main(String[] args) {
    167                 if (Boolean.getBoolean("auth")) {
     167                if (Boolean.getBoolean("expeditee.authentication")) {
    168168                        String starting_user_name = System.getProperty("user.name");
    169169                        System.setProperty("startinguser.name", starting_user_name);
     
    203203       
    204204        public static void init() {
    205                 if (Boolean.getBoolean("auth")) {
     205                if (Boolean.getBoolean("expeditee.authentication")) {
    206206                        try {
    207207                                _theBrowser = AuthenticatorBrowser.getInstance();
     
    274274                Frame userProfile = loadProfiles();
    275275
    276                 if (!Boolean.getBoolean("auth")) {
     276                if (!Boolean.getBoolean("expeditee.authentication")) {
    277277                        String userName = UserSettings.ProfileName.get();
    278278                        FrameIO.setupPersonalResources(userName);
  • trunk/src/org/expeditee/gui/FrameIO.java

    r1284 r1287  
    165165                }
    166166               
    167                 if (!UserSettings.PublicAndPrivateResources || UserSettings.UserName.get().equals(Browser.USER_NOBODY)) {
     167                if (!UserSettings.PublicAndPrivateResources || !AuthenticatorBrowser.isAuthenticated()) {
    168168                       
    169169                        if (System.getProperty("user.name").equals(Browser.USER_NOBODY)) {
  • trunk/src/org/expeditee/settings/UserSettings.java

    r1277 r1287  
    3030import org.expeditee.agents.mail.MailSession;
    3131import org.expeditee.agents.wordprocessing.JSpellChecker;
    32 import org.expeditee.gui.Browser;
     32import org.expeditee.auth.AuthenticatorBrowser;
    3333import org.expeditee.gui.Frame;
    3434import org.expeditee.gui.FrameIO;
     
    241241
    242242        public static void appendDefaultFolders() {
    243                 if (PublicAndPrivateResources && !UserSettings.UserName.get().equals(Browser.USER_NOBODY)) {
     243                if (PublicAndPrivateResources && AuthenticatorBrowser.isAuthenticated()) {
    244244                        // The comments here explain how things have changed with the new regime.
    245245                        // FrameDirs
Note: See TracChangeset for help on using the changeset viewer.