-
-
Notifications
You must be signed in to change notification settings - Fork 33
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 #383 from josdem/feature/379
[small]Feature/379
- Loading branch information
Showing
8 changed files
with
161 additions
and
3 deletions.
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
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/josdem/vetlog/controller/PrivacyController.java
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,33 @@ | ||
/* | ||
Copyright 2024 Jose Morales [email protected] | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package com.josdem.vetlog.controller; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@Slf4j | ||
@Controller | ||
@RequestMapping("/privacy") | ||
public class PrivacyController { | ||
|
||
@RequestMapping("/show") | ||
public String index() { | ||
log.info("Showing privacy page"); | ||
return "privacy/show"; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,3 +270,15 @@ service.surgery.teeth.twenty.two=$1400 MXN | |
service.surgery.teeth.forty.four=$2100 MXN | ||
service.surgery.teeth.sixty.six=$2900 MXN | ||
service.surgery.teeth.sixty.seven=$3600 MXN | ||
privacy.title=Aviso de Privacidad | ||
privacy.header=Bienvenidos al aviso de privacidad de Vetlog | ||
privacy.description=Vetlog es una aplicación web ó sitio web, que te permite registrar tus mascotas y su historial médico. Estamos comprometidos a proteger tu privacidad. Esta Política de Privacidad explica cómo recopilamos, usamos, divulgamos y protegemos tu información cuando visitas nuestro sitio web. Por favor, lee esta Política de Privacidad cuidadosamente. SI NO ESTÁS DE ACUERDO CON LOS TÉRMINOS DE ESTA POLÍTICA DE PRIVACIDAD, POR FAVOR NO ACCEDAS AL SITIO. | ||
privacy.information.title=Información que Recopilamos | ||
privacy.information.description=Recopilamos información personal que nos proporcionas voluntariamente al registrarte en el sitio web expresando interés en obtener información sobre nosotros o nuestros servicios, al participar en actividades en el sitio web. | ||
privacy.usage.title=Uso de tu Información | ||
privacy.usage.description=Tener información precisa sobre ti y tus mascotas nos permite proporcionarte una buena experiencia, eficiente y personalizada. Específicamente, podemos usar la información recopilada sobre ti a través del sitio web para: | ||
privacy.usage.list=Crear y administrar tu cuenta y el historial médico de tus mascotas. | ||
privacy.disclosure.title=Divulgación de tu Información | ||
privacy.disclosure.description=No compartiremos ninguna información que hayamos recopilado sobre ti o tus mascotas con ninguna entidad de terceros. | ||
privacy.security.title=Seguridad de tu Información | ||
privacy.security.description=Usamos autenticación, autorización y filtros para manejar el acceso de los usuarios al sitio web, no conocemos tu contraseña, ya que usamos la función de hash BCrypt para almacenarlas, y otras medidas de seguridad estándar para ayudar a proteger tu información personal. Por la presente declaramos, según nuestro leal saber y entender, que tu información está segura. Si encuentras alguna vulnerabilidad de seguridad que haya sido causada inadvertidamente por nosotros, o tienes alguna pregunta sobre cómo el sitio web protege tu privacidad, por favor contáctanos en [email protected] y con gusto te apoyamos. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<html> | ||
<html xmlns:th="https://www.thymeleaf.org"> | ||
<head> | ||
<title th:text="#{privacy.title}"></title> | ||
<head th:insert="~{fragments/include}"/> | ||
</head> | ||
<body class="login"> | ||
<div th:insert="~{fragments/header}"/> | ||
<br/><br/> | ||
<br/><br/> | ||
<br/><br/> | ||
<h3 class="text-center" th:text="#{privacy.header}"></h3> | ||
<br/> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-4 col-lg-offset-4"> | ||
<div class="portlet portlet-green"> | ||
<div class="portlet-body"> | ||
<p th:text="#{privacy.description}"></p> | ||
</div> | ||
</div> | ||
<h4 th:text="#{privacy.information.title}"></h4> | ||
<div class="portlet portlet-green"> | ||
<div class="portlet-body"> | ||
<p th:text="#{privacy.information.description}"></p> | ||
</div> | ||
</div> | ||
<h4 th:text="#{privacy.usage.title}"></h4> | ||
<div class="portlet portlet-green"> | ||
<div class="portlet-body"> | ||
<p th:text="#{privacy.usage.description}"></p> | ||
<p th:text="#{privacy.usage.list}"></p> | ||
</div> | ||
</div> | ||
<h4 th:text="#{privacy.disclosure.title}"></h4> | ||
<div class="portlet portlet-green"> | ||
<div class="portlet-body"> | ||
<p th:text="#{privacy.disclosure.description}"></p> | ||
</div> | ||
</div> | ||
<h4 th:text="#{privacy.security.title}"></h4> | ||
<div class="portlet portlet-green"> | ||
<div class="portlet-body"> | ||
<p th:text="#{privacy.security.description}"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div th:insert="~{fragments/footer}"/> | ||
</body> | ||
</html> |
46 changes: 46 additions & 0 deletions
46
src/test/java/com/josdem/vetlog/controller/PrivacyControllerTest.java
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,46 @@ | ||
/* | ||
Copyright 2024 Jose Morales [email protected] | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package com.josdem.vetlog.controller; | ||
|
||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInfo; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
|
||
@Slf4j | ||
@SpringBootTest | ||
@AutoConfigureMockMvc | ||
class PrivacyControllerTest { | ||
|
||
@Autowired | ||
private MockMvc mockMvc; | ||
|
||
@Test | ||
@DisplayName("showing privacy page") | ||
void shouldShowHomePage(TestInfo testInfo) throws Exception { | ||
log.info("Running: {}", testInfo.getDisplayName()); | ||
mockMvc.perform(get("/privacy/show")).andExpect(status().isOk()).andExpect(view().name("privacy/show")); | ||
} | ||
} |