package org.mskcc.portal.util;

public class SkinUtil {

    public static String getTitle() {
        Config config = Config.getInstance();
        return config.getProperty("skin.title");
    }

    public static String getBlurb() {
        Config config = Config.getInstance();
        return config.getProperty("skin.blurb");
    }

    /**
     * Determines if users must authenticate or not.
     * @return true or false.
     */
    public static boolean usersMustAuthenticate() {
        Config config = Config.getInstance();
        String authentication =  config.getProperty("authenticate");
        if (authentication != null && authentication.startsWith("T")) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Gets the Global Authentication User Name.
     * @return Authentication User Name.
     */
    public static String getAuthenticationUserName() {
        Config config = Config.getInstance();
        String globalUserName = config.getProperty("authenticate.user_name");
        if (globalUserName == null) {
            globalUserName = "guest";
        }
        return globalUserName;
    }

    /**
     * Gets the Global Authentication Password.
     * @return Authentication Password.
     */
    public static String getAuthenticationPassword() {
        Config config = Config.getInstance();
        String globalPassword = config.getProperty("authenticate.password");
        if (globalPassword == null) {
            globalPassword = "guest";
        }
        return globalPassword;
    }

}

@@ -531,41 +531,29 @@
 ();%0A
-        String authentication =  
+%09%09return new Boolean(
 conf
@@ -586,159 +586,10 @@
 te%22)
+)
 ;
-%0A        if (authentication != null && authentication.startsWith(%22T%22)) %7B%0A            return true;%0A        %7D else %7B%0A            return false;%0A        %7D
 %0A   
@@ -1406,11 +1406,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

update to userMustAuthenticate()