Commit a094465
Release v0.4 (#74)
* Roles and permissions integration with Spring Security (#37)
- Roles and permissions are integrated with spring security -- you can use `@PreAuthorize` with `hasRole`, `hasAuhtority`, etc. on our endpoints now 🎉.
- The POST `/api/products` endpoint has been secured🔒.
- Removed unecessary `level` property from the `roles_permissions` ❌.
- Added `RoleService`, which provides interface for creating roles, granting users etc., it also provides the default roles and injects them in `AuthService.register()` 🔑.
- Roles and permissions are included in the jwt access token (as claims) response -- `JwtService.generateToken` relies on `JwtUserClaims` object that may be created with `JwtClaimsService` 😺.
- Created `RoleServiceTest` 👩🔬.
- Provided additional tests to `AuthService` (testing the default roles injection), and `JwtService` (testing the new claims mechanism) 👩🔬.
- Added basic roles and permissions to the liquibase migration script 📝.
- Added mocked users -- one with `USER` role one with `MODERATOR` role into the liquibase migration script. It should make the testing more convenient, but we need to change it to the production only using liquibase contexts in the future 📝.
* Products paging (#44)
* Products paging
* Tests updated (paging)
* Prepare for CD (#53)
* Update application.properties
* Git queen zofia/31 (#51)
* Products paging
* Tests updated (paging)
* Liking products doesn't work :(
* Liking products works!!
* style.
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/UserService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/UserService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
* Git queen zofia/32 (#52)
* Liking ingredients (beginning)
* Liking ingredients, adding allergens
* changelog added
* Update UserService.java
* Product volume should be of type `String` (#59)
* Update User.java
* Update Product.java
* Update FullProductDto.java
* Update ProductServiceTest.java
* Prepare CD workflow
* Update test.yml
* Backend CD (#61)
* Create test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update docker.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Update test.yml
* Rename test.yml to deploy.yml
* Git queen zofia/55 (#57)
* Liking ingredients (beginning)
* Liking ingredients, adding allergens
* changelog added
* imports
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
* Git queen zofia/54 (#56)
* Products paging
* Tests updated (paging)
* Liking products doesn't work :(
* Liking products works!!
* style.
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/ProductService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/UserService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Update src/main/java/pl/edu/pw/mini/ingreedio/api/service/UserService.java
Co-authored-by: Jakub Żuchowski <[email protected]>
* Like products tests
* imports
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
* simple ingredient search (#58)
* simple ingredient search
* Update IngredientService.java
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
* Filtering, searching and sorting products (#70)
* Release v0.3 (#40)
* Update docker.yml
* Update docker.yml
* Update docker.yml
* MongoDB setup (#16)
* MongoDB!
* Dockerized tests
* Bug: wrong mongo port
* Username naming changed (#18)
* Update docker-compose.yml
* Products fetching (#20)
* Products fetching
* Update Application.run.xml
* style corrected
* tests corrected
* checkstyle
* Import the ingredients names to postgres db (#21)
* HelloWorldController hotfix
* Add roles and permissions tables and entities (#22)
* Added roles sql schema
* Added entites classes
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
* Filtering of products (#23)
* Permitted POST requests to /api/products
* Filtering products by fields
* Checkstyle is persecuting me
* Some tests, filtering by ingredients with array
* Builder for criteria utilized, Checkstyle corrections
* Endpoint moving, small fixes. (#24)
Closes #19
* Removed searching (by keywords) from filtering, corrected tests (#26)
* Filtering products bugfixes (#28)
* New tests, attempt to solve bugs (failed :c)
* search + fixed tests
* Revert "Merge branch 'develop' into mslup/hotfix/3"
This reverts commit eb035d8, reversing
changes made to 943168d.
* Checkstyle corrections
---------
Co-authored-by: GitQueenZofia <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
* Reviewdog setup (#38)
* Endpoint moving, small fixes.
Closes #19
* Reviewdog setup
* Update reviewdog.yml
* Version bump
* Update gradle.yml
---------
Co-authored-by: Marcin Słupczyński <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
Co-authored-by: Michał Okurowski <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
* Added 2 stages of searching
* Moved keywords creation logic
* Fixed paging
* matchScore works
* Styling fix
* Added TODO
* Added brand, provider and category to criteria
* Fixed tests
* Fixed styling issues
* Added suppress warnings to tests
* Added suppress warnings to tests 2
* Checkstyle
* Update Application.run.xml
* Fixed case sensitivity issues
* Fixed ProductsCriteriaService
* Added case sensitivity test
* Changed ingredients List to Set
* Upgrade Optional stream
Co-authored-by: Jakub Żuchowski <[email protected]>
* Comment typo fix
Co-authored-by: Jakub Żuchowski <[email protected]>
* Changed ProductCriteria to record
* Moved query to resource
* Json should be .json :)
* typo
* change the format also in test
im dumbo and i forgor
---------
Co-authored-by: Jakub Żuchowski <[email protected]>
Co-authored-by: Marcin Słupczyński <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
* Version bump
---------
Co-authored-by: Michał Okurowski <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>
Co-authored-by: Marcin Słupczyński <[email protected]>
Co-authored-by: GitQueenZofia <[email protected]>1 parent 5d02eb8 commit a094465
File tree
54 files changed
+2227
-526
lines changed- .github/workflows
- src
- main
- java/pl/edu/pw/mini/ingreedio/api
- config
- controller
- criteria
- dto
- exception
- mapper
- model
- repository
- impl
- security
- service
- resources
- db/changelog
- test-data
- mongodb/query
- test
- java/pl/edu/pw/mini/ingreedio/api/service
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+2227
-526
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 20 | | |
29 | 21 | | |
30 | 22 | | |
| |||
46 | 38 | | |
47 | 39 | | |
48 | 40 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 109 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
Lines changed: 62 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
20 | 23 | | |
21 | | - | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
33 | 42 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
55 | 68 | | |
56 | | - | |
| 69 | + | |
| 70 | + | |
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
| |||
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| 80 | + | |
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
73 | 115 | | |
0 commit comments