Support to get/set/delete/generate an HTTP password via REST

The HTTP password of a user can now be retrieved by GET on
/accounts/<account-id>/password.http.

By PUT on /accounts/<account-id>/password.http a new HTTP password can
be generated or set. Directly setting an HTTP password is only allowed
for Gerrit administrators.

By DELETE on /accounts/<account-id>/password.http the HTTP password can
be cleared.

The WebUI is adapted to use the new REST endpoints to generate/clear
the HTTP password. The old RPCs for this are deleted.

Change-Id: I1424f1d4b45e5409095b51f05c9c6afe26e66800
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-05-28 11:23:10 +02:00
committed by Edwin Kempin
parent 12c35d3ed8
commit d9cdf5eea4
11 changed files with 314 additions and 198 deletions

View File

@@ -47,16 +47,6 @@ public interface AccountSecurity extends RemoteJsonService {
@SignInRequired
void changeUserName(String newName, AsyncCallback<VoidResult> callback);
@Audit
@SignInRequired
void generatePassword(AccountExternalId.Key key,
AsyncCallback<AccountExternalId> callback);
@Audit
@SignInRequired
void clearPassword(AccountExternalId.Key key,
AsyncCallback<AccountExternalId> gerritCallback);
@SignInRequired
void myExternalIds(AsyncCallback<List<AccountExternalId>> callback);