-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from fmIst0/improvements
added default admin user for AWS to test methods only for admins
- Loading branch information
Showing
7 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,12 @@ Docker Compose with command : `docker-compose up` | |
|
||
## Or try to test with [Swagger](http://ec2-16-170-234-204.eu-north-1.compute.amazonaws.com/swagger-ui/index.html#/)📍 | ||
|
||
### Login | ||
{<br/> | ||
"email": "[email protected]",<br/> | ||
"password": "1234567890"<br/> | ||
} | ||
|
||
|
||
|
||
|
||
|
18 changes: 18 additions & 0 deletions
18
src/main/resources/db/changelog/changes/16-add-admin-to-users-table.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: add-admin-to-users-table | ||
author: fmIst0 | ||
changes: | ||
- insert: | ||
tableName: users | ||
columns: | ||
- column: | ||
{name: "email", value: "[email protected]"} | ||
- column: | ||
{name: "password", value: "1234567890"} | ||
- column: | ||
{name: "first_name", value: "Bob"} | ||
- column: | ||
{name: "last_name", value: "Doe"} | ||
- column: | ||
{name: "shipping_address", value: "New Shipping Address"} |
19 changes: 19 additions & 0 deletions
19
src/main/resources/db/changelog/changes/17-give-admin-role-to-user.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: give-admin-role-to-user | ||
author: fmIst0 | ||
changes: | ||
- sql: | ||
dbms: mysql | ||
sql: | | ||
INSERT INTO users_roles (user_id, role_id) | ||
SELECT id, 1 | ||
FROM users | ||
WHERE email = '[email protected]' | ||
- sql: | ||
dbms: mysql | ||
sql: | | ||
INSERT INTO users_roles (user_id, role_id) | ||
SELECT id, 2 | ||
FROM users | ||
WHERE email = '[email protected]' |
12 changes: 12 additions & 0 deletions
12
src/main/resources/db/changelog/changes/17-reset-to-bencrypted-password-for-user.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: reset-to-bencrypted-password-for-user | ||
author: fmIst0 | ||
changes: | ||
- update: | ||
tableName: users | ||
columns: | ||
- column: | ||
name: password | ||
value: "$2a$10$v4st87IQUD8HRp07RoTbd.QOOU7VXLVaOORFx5UNbr6Galn8/O.lW" | ||
where: email='[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/test/resources/database/users_roles/delete-from-users-roles.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM users_roles; |