From cba11d54ff012d98d929bf24cbd66bc0529a7f70 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Wed, 17 Apr 2024 21:43:49 +0200 Subject: [PATCH 1/2] Page to right size (#152) Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/152 Reviewed-by: Maxime <231026@umons.ac.be> Co-authored-by: Anthony Debucquoy Co-committed-by: Anthony Debucquoy --- frontend/src/App.vue | 13 ++++++------- frontend/src/assets/main.css | 4 ++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 6dcad67..40fbbc6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -99,20 +99,19 @@ window.addEventListener('hashchange', () => { height: 100%; width: 100%; display:grid; - grid-template-columns:[firstCol-start]70px[firstCol-end secondCol-start]auto[endCol]; - grid-template-rows:[firstRow-start]61px[firstRow-end secondRow-start] auto [endRow]; + + grid-template-columns:[firstCol-start]70px[firstCol-end secondCol-start] auto [endCol]; + grid-template-rows:[firstRow-start] var(--header-size) [firstRow-end secondRow-start] calc(100% - var(--header-size)) [endRow]; grid-template-areas: "topBar topBar" "leftBar page"; - row-gap:0px; - column-gap:0px; + } .page { grid-area:page; height: 100%; width: 100%; - place-self:center; } .topBar{ @@ -155,7 +154,7 @@ window.addEventListener('hashchange', () => { ul.vertical{ list-style-type: none; - margin-top: 61px; + margin-top: var(--header-size); top:0; left:0; padding: 25px 0 0; @@ -203,7 +202,7 @@ window.addEventListener('hashchange', () => { left:0; position: fixed; - height:61px; + height:var(--header-size); width: 100%; background-color: rgb(24, 24, 24); } diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 54ce8d8..67f454e 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -1,3 +1,7 @@ +:root { + --header-size: 61px; +} + body { background-color: rgb(53, 25, 60); margin:0; From f19236b3f77b1e78eacdbde1e8e63cf51f18e2b4 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Sun, 7 Apr 2024 14:46:14 +0200 Subject: [PATCH 2/2] Avoid password leakage The password should never be parsed to json ever so can be safely ignored. --- backend/src/main/java/ovh/herisson/Clyde/Tables/User.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/User.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/User.java index 2badd32..0aa43a9 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/User.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/User.java @@ -7,6 +7,8 @@ import ovh.herisson.Clyde.Tables.Msg.Message; import java.util.Date; import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnore; + @Entity @Table(name = "Users") @@ -22,7 +24,8 @@ public class User { private String country; private Date birthDate; private String profilePictureUrl; - private ovh.herisson.Clyde.Tables.Role role; + private Role role; + @JsonIgnore private String password; ////// Extension Messagerie /////