You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2009/07/29 02:18:43 UTC

svn commit: r798734 - /qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java

Author: robbie
Date: Wed Jul 29 00:18:42 2009
New Revision: 798734

URL: http://svn.apache.org/viewvc?rev=798734&view=rev
Log:
QPID-2009: mask the password Text field value when creating a new user or reseting an existing users password

Modified:
    qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java

Modified: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java?rev=798734&r1=798733&r2=798734&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java (original)
+++ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java Wed Jul 29 00:18:42 2009
@@ -265,7 +265,17 @@
                                                                         selectionIndex).getData();
                     String user = selectedLogger.get(USERNAME).toString();
                     InputDialog id = new InputDialog(setPasswordButton.getShell(),"Set Password",
-                                        "Please enter the new password for '" + user + "':",null,null);
+                                        "Please enter the new password for '" + user + "':",null,null){
+                        @Override
+                        protected Control createDialogArea(Composite parent)
+                        {
+                            Control control = super.createDialogArea(parent);
+                            //set the Text field echo char to '*' to mask the password 
+                            getText().setEchoChar('*');
+                            //return the normal result
+                            return control;
+                        }
+                    };
                     
                     int returnValue;
                     while((returnValue = id.open()) == InputDialog.OK)
@@ -710,7 +720,7 @@
         passwordComposite.setLayout(new GridLayout(2,false));
         
         _toolkit.createLabel(passwordComposite,"Password:").setBackground(shell.getBackground());
-        final Text passwordText = new Text(passwordComposite, SWT.BORDER);
+        final Text passwordText = new Text(passwordComposite, SWT.BORDER | SWT.PASSWORD);
         passwordText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
         
         Group buttonGroup = new Group(shell, SWT.NONE);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org