mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 10:09:42 +00:00
added a ChangePassword entry point
This commit is contained in:
1 parent
09465a748a
commit
74815b1a38
15 files changed
+272
-8
No files matched your search
@@ -50,7 +50,7 @@
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/Search.html com.sap.sailing.gwt.ui.Search -startupUrl /security/ui/Login.html com.sap.sse.security.ui.Login com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.TvView com.sap.sailing.gwt.ui.UserManagement com.sap.sailing.gwt.ui.Search com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard com.sap.sailing.gwt.AutoPlay"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/Search.html com.sap.sailing.gwt.ui.Search -startupUrl /security/ui/Login.html com.sap.sse.security.ui.Login -startupUrl /security/ui/ChangePassword.html com.sap.sse.security.ui.ChangePassword com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.TvView com.sap.sailing.gwt.ui.UserManagement com.sap.sailing.gwt.ui.Search com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -XX:MaxPermSize=512m"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,3 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgLiAtbG9jYWxXb3JrZXJzIDMgLXN0cmljdCAtbG9nTGV2ZWwgVFJBQ0VdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDIwMjRtIC1EZ3d0LnVzZWFyY2hpdmVzPWZhbHNlXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zc2Uuc2VjdXJpdHkudWkuUmVnaXN0ZXI8L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc3NlLnNlY3VyaXR5LnVpLk9BdXRoTG9naW48L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc3NlLnNlY3VyaXR5LnVpLkxvZ2luPC9lbnRyeS1wb2ludC1tb2R1bGU+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20uc2FwLnNzZS5zZWN1cml0eS51aS5Vc2VyTWFuYWdlbWVudDwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
|
||||
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgLiAtbG9jYWxXb3JrZXJzIDMgLXN0cmljdCAtbG9nTGV2ZWwgVFJBQ0VdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDIwMjRtIC1EZ3d0LnVzZWFyY2hpdmVzPWZhbHNlXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zc2Uuc2VjdXJpdHkudWkuUmVnaXN0ZXI8L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc3NlLnNlY3VyaXR5LnVpLk9BdXRoTG9naW48L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc3NlLnNlY3VyaXR5LnVpLkxvZ2luPC9lbnRyeS1wb2ludC1tb2R1bGU+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20uc2FwLnNzZS5zZWN1cml0eS51aS5Vc2VyTWFuYWdlbWVudDwvZW50cnktcG9pbnQtbW9kdWxlPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zc2Uuc2VjdXJpdHkudWkuQ2hhbmdlUGFzc3dvcmQ8L2VudHJ5LXBvaW50LW1vZHVsZT48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\=
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<!doctype html>
|
||||
<!-- The DOCTYPE declaration above will set the -->
|
||||
<!-- browser's rendering engine into -->
|
||||
<!-- "Standards Mode". Replacing this declaration -->
|
||||
<!-- with a "Quirks Mode" doctype may lead to some -->
|
||||
<!-- differences in layout. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<!-- -->
|
||||
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||
<!-- -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="images/sap.ico" />
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- Any title is fine -->
|
||||
<!-- -->
|
||||
<title>SAP Sailing Analytics Login</title>
|
||||
|
||||
<!-- -->
|
||||
<!-- This script loads your compiled module. -->
|
||||
<!-- If you add any GWT meta tags, they must -->
|
||||
<!-- be added before this line. -->
|
||||
<!-- -->
|
||||
<script type="text/javascript" language="javascript" src="com.sap.sse.security.ui.ChangePassword/com.sap.sse.security.ui.ChangePassword.nocache.js"></script>
|
||||
</head>
|
||||
|
||||
<!-- -->
|
||||
<!-- The body can have arbitrary html, or -->
|
||||
<!-- you can leave the body empty if you want -->
|
||||
<!-- to create a completely dynamic UI. -->
|
||||
<!-- -->
|
||||
<body>
|
||||
|
||||
<!-- OPTIONAL: include this if you want history support -->
|
||||
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
||||
|
||||
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
|
||||
<noscript>
|
||||
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
|
||||
Your web browser must have JavaScript enabled
|
||||
in order for this application to display correctly.
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,5 +10,7 @@ bin.includes = META-INF/,\
|
||||
Register.html,\
|
||||
com.sap.sse.security.ui.UserManagement/,\
|
||||
com.sap.sse.security.ui.Login/,\
|
||||
com.sap.sse.security.ui.Register/
|
||||
com.sap.sse.security.ui.Register/,\
|
||||
com.sap.sse.security.ui.OAuthLogin/,\
|
||||
ChangePassword.html
|
||||
output.. = WEB-INF/classes/
|
||||
@@ -62,6 +62,7 @@
|
||||
<module>com.sap.sse.security.ui.OAuthLogin</module>
|
||||
<module>com.sap.sse.security.ui.LoginPanel</module>
|
||||
<module>com.sap.sse.security.ui.Register</module>
|
||||
<module>com.sap.sse.security.ui.ChangePassword</module>
|
||||
</modules>
|
||||
<gen>${basedir}/.generated</gen>
|
||||
<localWorkers>3</localWorkers>
|
||||
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package com.sap.sse.security.ui.changepasssword;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.event.dom.client.KeyUpEvent;
|
||||
import com.google.gwt.event.dom.client.KeyUpHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.rpc.ServiceDefTarget;
|
||||
import com.google.gwt.user.client.ui.DockLayoutPanel;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.FormPanel;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitHandler;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.PasswordTextBox;
|
||||
import com.google.gwt.user.client.ui.RootLayoutPanel;
|
||||
import com.google.gwt.user.client.ui.SubmitButton;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.sap.sse.gwt.client.EntryPointHelper;
|
||||
import com.sap.sse.security.shared.UserManagementException;
|
||||
import com.sap.sse.security.ui.client.RemoteServiceMappingConstants;
|
||||
import com.sap.sse.security.ui.client.StringMessages;
|
||||
import com.sap.sse.security.ui.client.UserService;
|
||||
import com.sap.sse.security.ui.client.UserStatusEventHandler;
|
||||
import com.sap.sse.security.ui.client.component.NewAccountValidator;
|
||||
import com.sap.sse.security.ui.shared.UserDTO;
|
||||
import com.sap.sse.security.ui.shared.UserManagementService;
|
||||
import com.sap.sse.security.ui.shared.UserManagementServiceAsync;
|
||||
|
||||
public class ChangePasswordEntryPoint implements EntryPoint {
|
||||
private final UserManagementServiceAsync userManagementService = GWT.create(UserManagementService.class);
|
||||
private final StringMessages stringMessages = GWT.create(StringMessages.class);
|
||||
|
||||
@Override
|
||||
public void onModuleLoad() {
|
||||
EntryPointHelper.registerASyncService((ServiceDefTarget) userManagementService,
|
||||
RemoteServiceMappingConstants.WEB_CONTEXT_PATH,
|
||||
RemoteServiceMappingConstants.userManagementServiceRemotePath);
|
||||
UserService userService = new UserService(userManagementService);
|
||||
final NewAccountValidator validator = new NewAccountValidator(stringMessages);
|
||||
RootLayoutPanel rootPanel = RootLayoutPanel.get();
|
||||
DockLayoutPanel dockPanel = new DockLayoutPanel(Unit.PX);
|
||||
rootPanel.add(dockPanel);
|
||||
FlowPanel fp = new FlowPanel();
|
||||
final Label errorLabel = new Label();
|
||||
fp.add(errorLabel);
|
||||
final Label nameLabel = new Label(stringMessages.username());
|
||||
fp.add(nameLabel);
|
||||
final TextBox nameText = new TextBox();
|
||||
nameText.setEnabled(false);
|
||||
userService.addUserStatusEventHandler(new UserStatusEventHandler() {
|
||||
@Override
|
||||
public void onUserStatusChange(UserDTO user) {
|
||||
if (user == null) {
|
||||
nameLabel.setText("");
|
||||
} else {
|
||||
nameLabel.setText(user.getName());
|
||||
}
|
||||
}
|
||||
});
|
||||
fp.add(nameText);
|
||||
Label currentPasswordLabel = new Label(stringMessages.currentPassword());
|
||||
fp.add(currentPasswordLabel);
|
||||
final TextBox currentPasswordText = new PasswordTextBox();
|
||||
fp.add(currentPasswordText);
|
||||
Label pwLabel = new Label(stringMessages.password());
|
||||
fp.add(pwLabel);
|
||||
final PasswordTextBox pwText = new PasswordTextBox();
|
||||
fp.add(pwText);
|
||||
Label pw2Label = new Label(stringMessages.passwordRepeat());
|
||||
fp.add(pw2Label);
|
||||
final PasswordTextBox pw2Text = new PasswordTextBox();
|
||||
fp.add(pw2Text);
|
||||
final SubmitButton submit = new SubmitButton(stringMessages.signUp());
|
||||
fp.add(submit);
|
||||
KeyUpHandler keyUpHandler = new KeyUpHandler() {
|
||||
@Override
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
String errorMessage = validator.validate(nameText.getText(), pwText.getText(), pw2Text.getText());
|
||||
if (errorMessage == null) {
|
||||
errorLabel.setText("");
|
||||
submit.setEnabled(true);
|
||||
} else {
|
||||
errorLabel.setText(errorMessage);
|
||||
submit.setEnabled(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
keyUpHandler.onKeyUp(null); // enable/disable submit button and fill error label
|
||||
nameText.addKeyUpHandler(keyUpHandler);
|
||||
pwText.addKeyUpHandler(keyUpHandler);
|
||||
pw2Text.addKeyUpHandler(keyUpHandler);
|
||||
FormPanel formPanel = new FormPanel();
|
||||
formPanel.addSubmitHandler(new SubmitHandler() {
|
||||
@Override
|
||||
public void onSubmit(SubmitEvent event) {
|
||||
userManagementService.updateSimpleUserPassword(nameText.getText(), currentPasswordText.getText(), pwText.getText(), new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log(caught.getMessage());
|
||||
if (caught instanceof UserManagementException) {
|
||||
String message = ((UserManagementException) caught).getMessage();
|
||||
if (UserManagementException.PASSWORD_DOES_NOT_MEET_REQUIREMENTS.equals(message)) {
|
||||
Window.alert(stringMessages.passwordDoesNotMeetRequirements());
|
||||
}
|
||||
} else {
|
||||
Window.alert(stringMessages.errorChangingPassword(caught.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
Window.alert(stringMessages.passwordSuccessfullyChanged());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
formPanel.add(fp);
|
||||
dockPanel.add(formPanel);
|
||||
}
|
||||
}
|
||||
+10
@@ -93,4 +93,14 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages {
|
||||
|
||||
String unknownErrorCreatingUser(String username);
|
||||
|
||||
String userAlreadyExists(String text);
|
||||
|
||||
String currentPassword();
|
||||
|
||||
String passwordSuccessfullyChanged();
|
||||
|
||||
String passwordDoesNotMeetRequirements();
|
||||
|
||||
String errorChangingPassword(String message);
|
||||
|
||||
}
|
||||
+5
@@ -42,3 +42,8 @@ enterRoleName=Enter role name...
|
||||
errorCreatingUser=Error signing up with username {0}: {1}
|
||||
signedUpSuccessfully=Successfully signed up user {0}
|
||||
unknownErrorCreatingUser=Unknown error trying to sign up user with name {0}. Perhaps another user with that name already exists.
|
||||
userAlreadyExists=A user with name {0} already exists
|
||||
currentPassword=Current password
|
||||
passwordSuccessfullyChanged=Password successfully changed
|
||||
passwordDoesNotMeetRequirements=Password does not meet requirements
|
||||
errorChangingPassword=Error changing password: {0}
|
||||
+5
@@ -42,3 +42,8 @@ enterRoleName=Rollennamen eingeben...
|
||||
errorCreatingUser=Fehler beim Anlegen des Benutzers mit Namen {0}: {1}
|
||||
signedUpSuccessfully=Benutzer {0} erfolgreich angelegt
|
||||
unknownErrorCreatingUser=Unbekannter Fehler beim Versuch, den Benutzer mit dem Namen {0} anzulegen. Möglicherweise existiert ein Benutzer gleichen Namens bereits.
|
||||
userAlreadyExists=Ein Benutzer mit dem Namen {0} existiert bereits
|
||||
currentPassword=Derzeitiges Passwort
|
||||
passwordSuccessfullyChanged=Passwort erfolgreich geändert
|
||||
passwordDoesNotMeetRequirements=Passwort genügt nicht den Anforderungen
|
||||
errorChangingPassword=Fehler beim Ändern des Passwortes: {0}
|
||||
+9
-1
@@ -19,6 +19,7 @@ import com.google.gwt.user.client.ui.RootLayoutPanel;
|
||||
import com.google.gwt.user.client.ui.SubmitButton;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.sap.sse.gwt.client.EntryPointHelper;
|
||||
import com.sap.sse.security.shared.UserManagementException;
|
||||
import com.sap.sse.security.ui.client.RemoteServiceMappingConstants;
|
||||
import com.sap.sse.security.ui.client.StringMessages;
|
||||
import com.sap.sse.security.ui.client.component.NewAccountValidator;
|
||||
@@ -84,8 +85,15 @@ public class RegisterEntryPoint implements EntryPoint {
|
||||
userManagementService.createSimpleUser(nameText.getText(), emailText.getText(), pwText.getText(), new AsyncCallback<UserDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Window.alert(stringMessages.errorCreatingUser(nameText.getText(), caught.getMessage()));
|
||||
GWT.log(caught.getMessage());
|
||||
if (caught instanceof UserManagementException) {
|
||||
String message = ((UserManagementException) caught).getMessage();
|
||||
if (UserManagementException.USER_ALREADY_EXISTS.equals(message)) {
|
||||
Window.alert(stringMessages.userAlreadyExists(nameText.getText()));
|
||||
}
|
||||
} else {
|
||||
Window.alert(stringMessages.errorCreatingUser(nameText.getText(), caught.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-1
@@ -32,12 +32,12 @@ import com.sap.sse.security.SecurityService;
|
||||
import com.sap.sse.security.SessionUtils;
|
||||
import com.sap.sse.security.Social;
|
||||
import com.sap.sse.security.shared.Account;
|
||||
import com.sap.sse.security.shared.Account.AccountType;
|
||||
import com.sap.sse.security.shared.DefaultRoles;
|
||||
import com.sap.sse.security.shared.SocialUserAccount;
|
||||
import com.sap.sse.security.shared.User;
|
||||
import com.sap.sse.security.shared.UserManagementException;
|
||||
import com.sap.sse.security.shared.UsernamePasswordAccount;
|
||||
import com.sap.sse.security.shared.Account.AccountType;
|
||||
import com.sap.sse.security.ui.oauth.client.CredentialDTO;
|
||||
import com.sap.sse.security.ui.oauth.client.SocialUserDTO;
|
||||
import com.sap.sse.security.ui.oauth.shared.OAuthException;
|
||||
@@ -137,6 +137,11 @@ public class UserManagementServiceImpl extends RemoteServiceServlet implements U
|
||||
return createUserDTOFromUser(u);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateSimpleUserPassword(String name, String oldPassword, String newPassword) throws UserManagementException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<UserDTO> getFilteredSortedUserList(String filter) {
|
||||
List<UserDTO> users = new ArrayList<>();
|
||||
|
||||
+2
@@ -19,6 +19,8 @@ public interface UserManagementService extends RemoteService {
|
||||
|
||||
UserDTO createSimpleUser(String name, String email, String password) throws UserManagementException;
|
||||
|
||||
void updateSimpleUserPassword(String name, String oldPassword, String newPassword) throws UserManagementException;
|
||||
|
||||
SuccessInfo deleteUser(String username);
|
||||
|
||||
SuccessInfo logout();
|
||||
|
||||
+2
@@ -17,6 +17,8 @@ public interface UserManagementServiceAsync {
|
||||
|
||||
void createSimpleUser(String name, String email, String password, AsyncCallback<UserDTO> callback);
|
||||
|
||||
void updateSimpleUserPassword(String name, String oldPassword, String newPassword, AsyncCallback<Void> callback);
|
||||
|
||||
void getFilteredSortedUserList(String filter, AsyncCallback<Collection<UserDTO>> callback);
|
||||
|
||||
void setRolesForUser(String username, Iterable<String> roles, AsyncCallback<SuccessInfo> callback);
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Could not determine the version of your GWT SDK; using the module DTD from GWT 1.6.4. You may want to change this. -->
|
||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
|
||||
<module>
|
||||
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
|
||||
<inherits name='com.google.gwt.debug.Debug'/>
|
||||
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
<stylesheet src="../Register.css" />
|
||||
|
||||
|
||||
<inherits name="com.google.gwt.resources.Resources" />
|
||||
<inherits name="com.google.gwt.logging.Logging"/>
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name="com.sap.sse.gwt.EmulatedJRE" /> -->
|
||||
<inherits name="com.sap.sse.gwt.SSESharedGWT" />
|
||||
<inherits name="com.sap.sse.SSECommon" />
|
||||
<inherits name="com.sap.sse.Security" />
|
||||
|
||||
<super-source path="jre" />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='com.sap.sse.security.ui.changepassword.ChangePasswordEntryPoint'/>
|
||||
|
||||
<set-property name="gwt.logging.enabled" value="TRUE"/>
|
||||
<set-property name="gwt.logging.logLevel" value="FINE"/>
|
||||
|
||||
<set-property name="gwt.logging.firebugHandler" value="ENABLED" />
|
||||
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED" />
|
||||
<set-property name="gwt.logging.consoleHandler" value="ENABLED" />
|
||||
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED" />
|
||||
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
|
||||
<set-property name="gwt.logging.systemHandler" value="ENABLED" />
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<extend-property name="locale" values="de"/>
|
||||
<source path='client'/>
|
||||
<source path='changepassword'/>
|
||||
<source path='shared'/>
|
||||
</module>
|
||||
+5
-3
@@ -6,9 +6,11 @@ public class UserManagementException extends Exception implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7555799541580565866L;
|
||||
|
||||
public static final String USER_DOES_NOT_EXIST = "User does not exist.";
|
||||
public static final String USER_ALREADY_EXISTS = "User already exists.";
|
||||
public static final String INVALID_CREDENTIALS = "Invalid Credentials.";
|
||||
public static final String USER_DOES_NOT_EXIST = "User does not exist";
|
||||
public static final String USER_ALREADY_EXISTS = "User already exists";
|
||||
public static final String INVALID_CREDENTIALS = "Invalid Credentials";
|
||||
public static final String PASSWORD_DOES_NOT_MEET_REQUIREMENTS = "Password does not meet requirements";
|
||||
public static final String USERNAME_DOES_NOT_MEET_REQUIREMENTS = "Username does not meet requirements";
|
||||
|
||||
public UserManagementException() {} // for GWT serialization
|
||||
|
||||
|
||||
Reference in new issue
Block a user