}
@Override
protected void onFormSubmit(GeoServerUser user) throws IOException,PasswordPolicyException {
GeoServerUserGroupStore ugStore =
new UserGroupStoreValidationWrapper(getUserGroupStore(ugServiceName));
try {
ugStore.addUser(user);
for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) {
ugStore.associateUserToGroup(user, group);
}
ugStore.store();
} catch (IOException ex) {
try {ugStore.load(); } catch (IOException ex2) {};
throw ex;
} catch (PasswordPolicyException ex) {
try {ugStore.load(); } catch (IOException ex2) {};
throw ex;
}
GeoServerRoleStore gaStore = null;
try {