diff --git a/build.gradle b/build.gradle index b8f41633..e51ba82e 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ ext { } group = 'com.josdem.vetlog' -version = '1.9.0' +version = '1.9.1' configurations { compileOnly { diff --git a/src/main/java/com/josdem/vetlog/config/WebSecurityConfig.java b/src/main/java/com/josdem/vetlog/config/WebSecurityConfig.java index 2c55d516..46c46933 100644 --- a/src/main/java/com/josdem/vetlog/config/WebSecurityConfig.java +++ b/src/main/java/com/josdem/vetlog/config/WebSecurityConfig.java @@ -47,7 +47,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti "/recovery/**", "/breed/list", "/pet/listForAdoption", - "/service/list") + "/privacy/show") .permitAll() .anyRequest() .authenticated()) diff --git a/src/main/java/com/josdem/vetlog/controller/PrivacyController.java b/src/main/java/com/josdem/vetlog/controller/PrivacyController.java new file mode 100644 index 00000000..41a9bdc8 --- /dev/null +++ b/src/main/java/com/josdem/vetlog/controller/PrivacyController.java @@ -0,0 +1,33 @@ +/* +Copyright 2024 Jose Morales contact@josdem.io + +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"; + } +} diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index bbbddc7c..556feb01 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -267,6 +267,20 @@ service.surgery.teeth.twenty.two=$80 USD service.surgery.teeth.forty.four=$120 USD service.surgery.teeth.sixty.six=$150 USD service.surgery.teeth.sixty.seven=$200 USD +privacy.title=Privacy Policy +privacy.header=Welcome to Vetlog Privacy Policy +privacy.description=Vetlog is a web application aka website, that allows you to register your pets and their medical history. We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website. Please read this Privacy Policy carefully. IF YOU DO NOT AGREE WITH THE TERMS OF THIS PRIVACY POLICY, PLEASE DO NOT ACCESS THE SITE. +privacy.information.title=Information We Collect +privacy.information.description=We collect personal information that you voluntarily provide to us when registering at the website expressing an interest in obtaining information about us or our services, when participating in activities on the website. +privacy.usage.title=Use of Your Information +privacy.usage.description=Having accurate information about you and your pets permits us to provide you with a smooth, efficient, and customized experience. Specifically, we may use information collected about you via the website to: +privacy.usage.list=Create and manage your account and your pets medical history. +privacy.disclosure.title=Disclosure of Your Information +privacy.disclosure.description=We will NOT share any information we have collected about you or your pets with any third party entity. +privacy.security.title=Security of Your Information +privacy.security.description=We use authentication, authorization and filters to handle user's access to the website, we don't know your password, since we use the BCrypt strong hashing function to store them, and other security measures to help protect your personal information. We hereby state, to the best of our knowledge and belief that your information is secure, If you find any security vulnerability that has been inadvertently caused by us, or have any question regarding how the website protects your privacy, please contact us and we will be happy to assist you. + + diff --git a/src/main/resources/i18n/messages_es.properties b/src/main/resources/i18n/messages_es.properties index a4b7497b..ce6d6ee3 100644 --- a/src/main/resources/i18n/messages_es.properties +++ b/src/main/resources/i18n/messages_es.properties @@ -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 vetlog@josdem.io y con gusto te apoyamos. \ No newline at end of file diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html index af4004e1..36382627 100644 --- a/src/main/resources/templates/fragments/footer.html +++ b/src/main/resources/templates/fragments/footer.html @@ -7,7 +7,8 @@ | | | - + | +
diff --git a/src/main/resources/templates/privacy/show.html b/src/main/resources/templates/privacy/show.html new file mode 100644 index 00000000..c2e66855 --- /dev/null +++ b/src/main/resources/templates/privacy/show.html @@ -0,0 +1,52 @@ + + + + + + + +
+

+

+

+

+
+
+
+
+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/test/java/com/josdem/vetlog/controller/PrivacyControllerTest.java b/src/test/java/com/josdem/vetlog/controller/PrivacyControllerTest.java new file mode 100644 index 00000000..94650d3a --- /dev/null +++ b/src/test/java/com/josdem/vetlog/controller/PrivacyControllerTest.java @@ -0,0 +1,46 @@ +/* +Copyright 2024 Jose Morales contact@josdem.io + +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")); + } +}