private void userChanged() { if (users == null) { return; } ClientUser user = null; if (users.getSelectedIndex() > 0) { final String email = users.getValue(users.getSelectedIndex()); if (userInfo.containsKey(email)) { user = userInfo.get(email); } Cookies.setCookie( "email", users.getValue(users.getSelectedIndex()), ParamSetSelectionController.getCookieExpirationDate(), null, "/", false); } // Figure out whether this user can edit parameters or not final boolean editorEnabled = user != null && user.isParameterEditorEnabled(); if (paramsEditor != null) { paramsEditor.setEditorEnabled(editorEnabled, user); } setOutputPathChangeEnabled(user != null && user.isOutputPathChangeEnabled()); }
private void selectUser(final String userEmail) { if (userEmail != null) { for (int i = 0; i < users.getItemCount(); i++) { if (users.getValue(i).equalsIgnoreCase(userEmail)) { users.setSelectedIndex(i); break; } } } userChanged(); }