mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
Update admin password for testing purposes.
This commit is contained in:
parent
eae4c9b512
commit
dcd04df8df
@ -4,7 +4,7 @@ INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code
|
|||||||
|
|
||||||
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE());
|
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE());
|
||||||
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
|
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
|
||||||
VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1,'D');
|
VALUES (2, 'Admin', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURDATE(), 1,'D');
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SHUTDOWN;
|
SHUTDOWN;
|
||||||
|
@ -8,6 +8,6 @@ INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code
|
|||||||
|
|
||||||
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE());
|
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE());
|
||||||
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
|
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
|
||||||
VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1,'D');
|
VALUES (2, 'Admin', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D');
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -24,19 +24,19 @@ The following variables should be replaced:
|
|||||||
|
|
||||||
Obtaining user information by email:
|
Obtaining user information by email:
|
||||||
* Template Path: /service/admin/users/email/{user.email}.json
|
* Template Path: /service/admin/users/email/{user.email}.json
|
||||||
* Example: curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/email/{user.email}.json" --get --basic -u "admin@wisemapping.org:admin"
|
* Example: curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/email/{user.email}.json" --get --basic -u "admin@wisemapping.org:test"
|
||||||
|
|
||||||
Deleting a based on the user id:
|
Deleting a based on the user id:
|
||||||
* Template Path: /service/admin/users/{userId}
|
* Template Path: /service/admin/users/{userId}
|
||||||
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/{userId}" --request delete --basic -u "admin@wisemapping.org:admin"
|
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/{userId}" --request delete --basic -u "admin@wisemapping.org:test"
|
||||||
|
|
||||||
Changing Password:
|
Changing Password:
|
||||||
Template Path: /service/admin/users/{userId}/password
|
Template Path: /service/admin/users/{userId}/password
|
||||||
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/{userId}/password" --request put --basic -u "admin@wisemapping.org:admin" -H "Content-Type:text/plain" --data "<new_password>"
|
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users/{userId}/password" --request put --basic -u "admin@wisemapping.org:test" -H "Content-Type:text/plain" --data "<new_password>"
|
||||||
|
|
||||||
Creating a new user:
|
Creating a new user:
|
||||||
* Template Path: /service/admin/users/
|
* Template Path: /service/admin/users/
|
||||||
* Method: Post
|
* Method: Post
|
||||||
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users" --request post --basic -u "admin@wisemapping.org:admin" -H "Content-Type:application/json" --data '{"email": "te2@mydomain.de", "lastname": "lastname", "firstname":"myfirstname","password":"password"}'
|
* curl "http://{host.name}:{host.port}/{context.path}/service/admin/users" --request post --basic -u "admin@wisemapping.org:test" -H "Content-Type:application/json" --data '{"email": "te2@mydomain.de", "lastname": "lastname", "firstname":"myfirstname","password":"password"}'
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ import static org.testng.Assert.fail;
|
|||||||
@Test(dataProviderClass = RestHelper.class, dataProvider="ContentType-Provider-Function")
|
@Test(dataProviderClass = RestHelper.class, dataProvider="ContentType-Provider-Function")
|
||||||
public class RestAdminITCase {
|
public class RestAdminITCase {
|
||||||
|
|
||||||
String authorisation = "admin@wisemapping.org" + ":" + "admin";
|
String authorisation = "admin@wisemapping.org" + ":" + "test";
|
||||||
|
|
||||||
@Test(dataProviderClass = RestHelper.class, dataProvider="ContentType-Provider-Function")
|
@Test(dataProviderClass = RestHelper.class, dataProvider="ContentType-Provider-Function")
|
||||||
public void changePassword(final @NotNull MediaType mediaType) { // Configure media types ...
|
public void changePassword(final @NotNull MediaType mediaType) { // Configure media types ...
|
||||||
|
@ -17,7 +17,7 @@ public class RestHelper {
|
|||||||
|
|
||||||
public static final String HOST_PORT = "http://localhost:8080";
|
public static final String HOST_PORT = "http://localhost:8080";
|
||||||
public static final String BASE_REST_URL = HOST_PORT + "/service";
|
public static final String BASE_REST_URL = HOST_PORT + "/service";
|
||||||
public static final String ADMIN_CREDENTIALS = "admin@wisemapping.org" + ":" + "admin";
|
public static final String ADMIN_CREDENTIALS = "admin@wisemapping.org" + ":" + "test";
|
||||||
public static final String COLOR = "#000000";
|
public static final String COLOR = "#000000";
|
||||||
|
|
||||||
static HttpHeaders createHeaders(@NotNull MediaType mediaType) {
|
static HttpHeaders createHeaders(@NotNull MediaType mediaType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user