From b874fb16a24c7c6eddd48715af03ae1cffa5cea4 Mon Sep 17 00:00:00 2001
From: AlineRinquin <90188226+AlineRinquin@users.noreply.github.com>
Date: Thu, 20 Jan 2022 09:37:14 +0100
Subject: [PATCH 1/3] commit pour pull
---
.idea/Organizee.iml | 9 ---------
.idea/compiler.xml | 2 ++
pom.xml | 13 +++++++------
3 files changed, 9 insertions(+), 15 deletions(-)
delete mode 100644 .idea/Organizee.iml
diff --git a/.idea/Organizee.iml b/.idea/Organizee.iml
deleted file mode 100644
index d6ebd48..0000000
--- a/.idea/Organizee.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index a8c4885..c75fd2a 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -6,11 +6,13 @@
+
diff --git a/pom.xml b/pom.xml
index 32eb628..9b437f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,12 +2,7 @@
4.0.0
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.6.1
-
-
+
fr.organizee
organizee
0.0.1-SNAPSHOT
@@ -16,6 +11,12 @@
11
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.6.1
+
+
org.springframework.boot
From 8a96240fd691befe8beea99d2ec4c3256b952252 Mon Sep 17 00:00:00 2001
From: AlineRinquin <90188226+AlineRinquin@users.noreply.github.com>
Date: Sun, 13 Feb 2022 14:39:49 +0100
Subject: [PATCH 2/3] =?UTF-8?q?ALINE:controller=20contact=20blocage=20pr?=
=?UTF-8?q?=C3=A9authorize?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fr/organizee/controller/ContactController.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/fr/organizee/controller/ContactController.java b/src/main/java/fr/organizee/controller/ContactController.java
index ef79042..e93e926 100644
--- a/src/main/java/fr/organizee/controller/ContactController.java
+++ b/src/main/java/fr/organizee/controller/ContactController.java
@@ -21,7 +21,7 @@ public class ContactController {
private ContactRepository contactRepo;
@GetMapping(value = "/{id}")
- @PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
+ //@PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
public ResponseEntity> findById(@PathVariable int id){
Optional contact = null;
try
@@ -35,7 +35,7 @@ public class ContactController {
}
@GetMapping(value = "team/{team_id}")
- @PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
+ //@PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
public ResponseEntity> findByTeamId(@PathVariable int team_id){
List contacts = null;
try
@@ -49,7 +49,7 @@ public class ContactController {
}
@PostMapping(value="/add")
- @PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
+ //@PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
public ResponseEntity> addContact(@RequestBody Contact contact){
Contact resultContact = null;
try {
@@ -62,7 +62,7 @@ public class ContactController {
}
@PutMapping("/update/{id}")
- @PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
+ //@PreAuthorize("hasRole('ROLE_PARENT') or hasRole('ROLE_ENFANT')")
public ResponseEntity> updateContact(@RequestBody Contact contact, @PathVariable Integer id) throws Exception {
Contact resultContact = null;
try {
@@ -76,7 +76,7 @@ public class ContactController {
}
@DeleteMapping(value = "/delete/{id}")
- @PreAuthorize("hasRole('ROLE_PARENT')")
+ //@PreAuthorize("hasRole('ROLE_PARENT')")
public ResponseEntity> deleteContact(@PathVariable int id){
try {
contactRepo.delete(contactRepo.getById(id));
From 54bf69a436d93b28c1d014c108a8d597022fbada Mon Sep 17 00:00:00 2001
From: AlineRinquin
Date: Thu, 17 Feb 2022 10:40:56 +0100
Subject: [PATCH 3/3] modification des contact ajout couleur
---
.idea/misc.xml | 3 +++
src/main/java/fr/organizee/model/Contact.java | 18 +++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 06e8b35..2289c27 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -11,4 +11,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/main/java/fr/organizee/model/Contact.java b/src/main/java/fr/organizee/model/Contact.java
index 826b2db..25b2d2d 100644
--- a/src/main/java/fr/organizee/model/Contact.java
+++ b/src/main/java/fr/organizee/model/Contact.java
@@ -11,6 +11,7 @@ public class Contact {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
+ private String couleur;
private String nom;
private String prenom;
private String telephone;
@@ -18,14 +19,15 @@ public class Contact {
private String adresse;
private LocalDate dateNaissance;
@ManyToOne
- @JoinColumn(name="TEAM_ID")
- @JsonIgnoreProperties({"contact","membre"})
+ @JoinColumn(name = "TEAM_ID")
+ @JsonIgnoreProperties({"contact", "membre"})
private Team team;
public Contact() {
}
- public Contact(String nom, String prenom, String telephone, String email, String adresse, LocalDate dateNaissance, Team team) {
+ public Contact(String couleur, String nom, String prenom, String telephone, String email, String adresse, LocalDate dateNaissance, Team team) {
+ this.couleur = couleur;
this.nom = nom;
this.prenom = prenom;
this.telephone = telephone;
@@ -43,6 +45,14 @@ public class Contact {
this.id = id;
}
+ public String getCouleur() {
+ return couleur;
+ }
+
+ public void setCouleur(String couleur) {
+ this.couleur = couleur;
+ }
+
public String getNom() {
return nom;
}
@@ -94,6 +104,7 @@ public class Contact {
public Team getTeam() {
return team;
}
+
public void setTeam(Team team) {
this.team = team;
}
@@ -102,6 +113,7 @@ public class Contact {
public String toString() {
return "Contact{" +
"id=" + id +
+ ", couleur='" + couleur + '\'' +
", nom='" + nom + '\'' +
", prenom='" + prenom + '\'' +
", telephone='" + telephone + '\'' +