Package net.datacrow.core.security

Examples of net.datacrow.core.security.SecurityCentre


    private void changePassword() {
        String currentPass = String.valueOf(fldCurrentPassword.getPassword());
       
        try {
            SecurityCentre sc = SecurityCentre.getInstance();
            SecuredUser su = sc.login(sc.getUser().getUsername(), currentPass, false);
            if (su != null) {
               
                String newPass1 = String.valueOf(fldNewPassword1.getPassword());
                String newPass2 = String.valueOf(fldNewPassword2.getPassword());

                if (newPass1.length() == 0 || newPass2.length() == 0) {
                    DcSwingUtilities.displayMessage("msgPleaseEnterNewPassword");
                } else if (newPass1.equals(newPass2)){
                    sc.changePassword(su.getUser(), newPass1);
                    close();
                } else {
                    DcSwingUtilities.displayMessage("msgPasswordsDoNotMatch");
                }
               
View Full Code Here


        fldNewPassword2 = null;
    }

    private void build() {
         getContentPane().setLayout(Layout.getGBL());
         SecurityCentre sc = SecurityCentre.getInstance();
        
         String name = sc.getUser().getUser().getName();
         String loginname = sc.getUser().getUsername();
        
         DcLongTextField help = ComponentFactory.getHelpTextField();
         help.setText(DcResources.getText("lblPasswordForUserX",
                      new String[] {name, loginname}));
        
View Full Code Here

TOP

Related Classes of net.datacrow.core.security.SecurityCentre

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.