diff --git a/2022-05/spring-26/.gitignore b/2022-05/spring-26/.gitignore new file mode 100644 index 00000000..4ea52072 --- /dev/null +++ b/2022-05/spring-26/.gitignore @@ -0,0 +1,24 @@ +target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/build/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ diff --git a/2022-05/spring-26/classwork/pom.xml b/2022-05/spring-26/classwork/pom.xml new file mode 100644 index 00000000..abf928dd --- /dev/null +++ b/2022-05/spring-26/classwork/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + ru.otus + classwork + 1.0-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-parent + 2.7.3 + + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.springframework.boot + spring-boot-starter-security + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/rest/PagesController.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/rest/PagesController.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/rest/PagesController.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/rest/PagesController.java diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/rest/SecurityControllerAdvice.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/rest/SecurityControllerAdvice.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/rest/SecurityControllerAdvice.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/rest/SecurityControllerAdvice.java diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/security/SecurityConfiguration.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/security/SecurityConfiguration.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/security/SecurityConfiguration.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/security/SecurityConfiguration.java diff --git a/2022-05/spring-26/src/main/java/ru/otus/spring/service/MyService.java b/2022-05/spring-26/classwork/src/main/java/ru/otus/spring/service/MyService.java similarity index 100% rename from 2022-05/spring-26/src/main/java/ru/otus/spring/service/MyService.java rename to 2022-05/spring-26/classwork/src/main/java/ru/otus/spring/service/MyService.java diff --git a/2022-05/spring-26/src/main/resources/templates/admin.html b/2022-05/spring-26/classwork/src/main/resources/templates/admin.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/admin.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/admin.html diff --git a/2022-05/spring-26/src/main/resources/templates/authenticated.html b/2022-05/spring-26/classwork/src/main/resources/templates/authenticated.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/authenticated.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/authenticated.html diff --git a/2022-05/spring-26/src/main/resources/templates/error.html b/2022-05/spring-26/classwork/src/main/resources/templates/error.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/error.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/error.html diff --git a/2022-05/spring-26/src/main/resources/templates/index.html b/2022-05/spring-26/classwork/src/main/resources/templates/index.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/index.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/index.html diff --git a/2022-05/spring-26/src/main/resources/templates/manager.html b/2022-05/spring-26/classwork/src/main/resources/templates/manager.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/manager.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/manager.html diff --git a/2022-05/spring-26/src/main/resources/templates/public.html b/2022-05/spring-26/classwork/src/main/resources/templates/public.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/public.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/public.html diff --git a/2022-05/spring-26/src/main/resources/templates/success.html b/2022-05/spring-26/classwork/src/main/resources/templates/success.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/success.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/success.html diff --git a/2022-05/spring-26/src/main/resources/templates/user.html b/2022-05/spring-26/classwork/src/main/resources/templates/user.html similarity index 100% rename from 2022-05/spring-26/src/main/resources/templates/user.html rename to 2022-05/spring-26/classwork/src/main/resources/templates/user.html diff --git a/2022-05/spring-26/pom.xml b/2022-05/spring-26/pom.xml index 8e3a6005..752df176 100644 --- a/2022-05/spring-26/pom.xml +++ b/2022-05/spring-26/pom.xml @@ -5,43 +5,14 @@ 4.0.0 ru.otus - spring-framework-26-security-authorization - 1.0-SNAPSHOT + spring-security-classwork + 1.0 - - org.springframework.boot - spring-boot-starter-parent - 2.7.0 - + pom - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - org.springframework.boot - spring-boot-starter-security - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - + + classwork + solution1 + solution2 + diff --git a/2022-05/spring-26/solution1/pom.xml b/2022-05/spring-26/solution1/pom.xml new file mode 100644 index 00000000..0017ea70 --- /dev/null +++ b/2022-05/spring-26/solution1/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + ru.otus + solution1 + 1.0-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-parent + 2.7.3 + + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.springframework.boot + spring-boot-starter-security + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java new file mode 100644 index 00000000..6b3bf909 --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java @@ -0,0 +1,13 @@ +package ru.otus.spring; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringSecurityAuthorization { + + public static void main(String[] args) { + SpringApplication.run(SpringSecurityAuthorization.class); + } + +} diff --git a/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/rest/PagesController.java b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/rest/PagesController.java new file mode 100644 index 00000000..b974b0eb --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/rest/PagesController.java @@ -0,0 +1,48 @@ +package ru.otus.spring.rest; + +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class PagesController { + + @GetMapping("/") + public String indexPage() { + return "index"; + } + + @GetMapping("/public") + public String publicPage() { + return "public"; + } + + @GetMapping("/user") + public String userPage() { + return "user"; + } + + @GetMapping("/manager") + public String managerPage() { + return "manager"; + } + + @GetMapping("/admin") + public String adminPage() { + return "admin"; + } + + @GetMapping("/authenticated") + public String authenticatedPage() { + UserDetails userDetails = (UserDetails) SecurityContextHolder + .getContext().getAuthentication().getPrincipal(); + System.out.println(userDetails.getUsername()); + return "authenticated"; + } + + @GetMapping("/success") + public String successPage() { + return "success"; + } +} diff --git a/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/security/SecurityConfiguration.java b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/security/SecurityConfiguration.java new file mode 100644 index 00000000..a8a1408c --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/java/ru/otus/spring/security/SecurityConfiguration.java @@ -0,0 +1,68 @@ +package ru.otus.spring.security; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.password.PasswordEncoder; + +@EnableWebSecurity +@Configuration +public class SecurityConfiguration extends WebSecurityConfigurerAdapter { + + + @Override + public void configure(WebSecurity web) { + web.ignoring().antMatchers("/"); + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http.csrf().disable() + //.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) + //.and() + .authorizeRequests().antMatchers("/public").permitAll() + .and() + .authorizeRequests().antMatchers("/authenticated", "/success").authenticated() + .and() + .authorizeRequests().antMatchers("/manager").hasAnyRole("MANAGER") + .and() + .authorizeRequests().antMatchers("/user").hasAnyRole("ADMIN", "USER") + + .and() + .authorizeRequests().antMatchers("/admin").hasRole("ADMIN") + .and() + .formLogin() + .and() + .logout().logoutUrl("/logout"); + } + + @Bean + public PasswordEncoder passwordEncoder() { + return new PasswordEncoder() { + @Override + public String encode(CharSequence charSequence) { + return charSequence.toString(); + } + + @Override + public boolean matches(CharSequence charSequence, String s) { + return charSequence.toString().equals(s); + } + }; + } + + @Autowired + public void configure(AuthenticationManagerBuilder auth) throws Exception { + auth.inMemoryAuthentication() + .withUser("admin").password("password").roles("ADMIN") + .and() + .withUser("user").password("password").roles("USER") + .and() + .withUser("manager").password("manager").roles("MANAGER", "USER"); + } +} diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/admin.html b/2022-05/spring-26/solution1/src/main/resources/templates/admin.html new file mode 100644 index 00000000..aa1c9563 --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/admin.html @@ -0,0 +1,9 @@ + + + + + + +Страница с доступом только админу + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/authenticated.html b/2022-05/spring-26/solution1/src/main/resources/templates/authenticated.html new file mode 100644 index 00000000..e4756c01 --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/authenticated.html @@ -0,0 +1,9 @@ + + + + + + +Только для аторизованных + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/error.html b/2022-05/spring-26/solution1/src/main/resources/templates/error.html new file mode 100644 index 00000000..f28b51df --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/error.html @@ -0,0 +1,9 @@ + + + + + + +Вам доступ запрещён! + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/index.html b/2022-05/spring-26/solution1/src/main/resources/templates/index.html new file mode 100644 index 00000000..9a8b9382 --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/index.html @@ -0,0 +1,17 @@ + + + + + + +/public +
+/authenticated +
+/user +
+/manager +
+/admin + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/manager.html b/2022-05/spring-26/solution1/src/main/resources/templates/manager.html new file mode 100644 index 00000000..dd4a77af --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/manager.html @@ -0,0 +1,9 @@ + + + + + + +Доступ к MANAGER + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/public.html b/2022-05/spring-26/solution1/src/main/resources/templates/public.html new file mode 100644 index 00000000..77188469 --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/public.html @@ -0,0 +1,9 @@ + + + + + + +Доступен всем + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/success.html b/2022-05/spring-26/solution1/src/main/resources/templates/success.html new file mode 100644 index 00000000..4e2a37cd --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/success.html @@ -0,0 +1,9 @@ + + + + + + +Вы успешно вошли ! + + diff --git a/2022-05/spring-26/solution1/src/main/resources/templates/user.html b/2022-05/spring-26/solution1/src/main/resources/templates/user.html new file mode 100644 index 00000000..a794bc2d --- /dev/null +++ b/2022-05/spring-26/solution1/src/main/resources/templates/user.html @@ -0,0 +1,9 @@ + + + + + + +Доступ к USER + + diff --git a/2022-05/spring-26/solution2/pom.xml b/2022-05/spring-26/solution2/pom.xml new file mode 100644 index 00000000..e609a896 --- /dev/null +++ b/2022-05/spring-26/solution2/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + ru.otus + solution2 + 1.0-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-parent + 2.7.3 + + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.springframework.boot + spring-boot-starter-security + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java new file mode 100644 index 00000000..6b3bf909 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/SpringSecurityAuthorization.java @@ -0,0 +1,13 @@ +package ru.otus.spring; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringSecurityAuthorization { + + public static void main(String[] args) { + SpringApplication.run(SpringSecurityAuthorization.class); + } + +} diff --git a/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/rest/PagesController.java b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/rest/PagesController.java new file mode 100644 index 00000000..2d6c044b --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/rest/PagesController.java @@ -0,0 +1,56 @@ +package ru.otus.spring.rest; + +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import ru.otus.spring.service.MyService; + +@Controller +public class PagesController { + + private final MyService myService; + + public PagesController(MyService myService) { + this.myService = myService; + } + + @GetMapping("/") + public String indexPage() { + return "index"; + } + + @GetMapping("/public") + public String publicPage() { + return "public"; + } + + @GetMapping("/user") + public String userPage() { + return "user"; + } + + @GetMapping("/manager") + public String managerPage() { + myService.onlyAdmin(); + return "manager"; + } + + @GetMapping("/admin") + public String adminPage() { + return "admin"; + } + + @GetMapping("/authenticated") + public String authenticatedPage() { + UserDetails userDetails = (UserDetails) SecurityContextHolder + .getContext().getAuthentication().getPrincipal(); + System.out.println(userDetails.getUsername()); + return "authenticated"; + } + + @GetMapping("/success") + public String successPage() { + return "success"; + } +} diff --git a/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java new file mode 100644 index 00000000..d7fe2d0d --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/MethodSecurityConfiguration.java @@ -0,0 +1,7 @@ +package ru.otus.spring.security; + +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; + +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class MethodSecurityConfiguration { +} diff --git a/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/SecurityConfiguration.java b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/SecurityConfiguration.java new file mode 100644 index 00000000..b907a6e0 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/security/SecurityConfiguration.java @@ -0,0 +1,71 @@ +package ru.otus.spring.security; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.password.PasswordEncoder; + +@EnableWebSecurity +@Configuration +public class SecurityConfiguration extends WebSecurityConfigurerAdapter { + + + @Override + public void configure(WebSecurity web) { + web.ignoring().antMatchers("/"); + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http.csrf().disable() + //.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) + //.and() + .authorizeRequests().antMatchers("/public").permitAll() + .and() + .authorizeRequests().antMatchers("/authenticated", "/success").authenticated() + .and() + .authorizeRequests().antMatchers("/manager").hasAnyRole("MANAGER") + .and() + .authorizeRequests().antMatchers("/user").hasAnyRole("ADMIN", "USER") + + .and() + .authorizeRequests().antMatchers("/admin").hasRole("ADMIN") + .and() + .formLogin() + .and() + .logout().logoutUrl("/logout"); + } + + @Bean + public PasswordEncoder passwordEncoder() { + return new PasswordEncoder() { + @Override + public String encode(CharSequence charSequence) { + return charSequence.toString(); + } + + @Override + public boolean matches(CharSequence charSequence, String s) { + return charSequence.toString().equals(s); + } + }; + } + + @Autowired + public void configure(AuthenticationManagerBuilder auth) throws Exception { + auth.inMemoryAuthentication() + .withUser("admin").password("password").roles("ADMIN") + .and() + .withUser("user").password("password").roles("USER") + .and() + .withUser("manager").password("manager").roles("MANAGER", "USER") + .and() + .withUser("managerin").password("managerin").roles("MANAGER", "ADMIN") + ; + } +} diff --git a/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/service/MyService.java b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/service/MyService.java new file mode 100644 index 00000000..3b316f45 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/java/ru/otus/spring/service/MyService.java @@ -0,0 +1,12 @@ +package ru.otus.spring.service; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.stereotype.Service; + +@Service +public class MyService { + + @PreAuthorize("hasRole('ADMIN')") + public void onlyAdmin() { + } +} diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/admin.html b/2022-05/spring-26/solution2/src/main/resources/templates/admin.html new file mode 100644 index 00000000..aa1c9563 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/admin.html @@ -0,0 +1,9 @@ + + + + + + +Страница с доступом только админу + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/authenticated.html b/2022-05/spring-26/solution2/src/main/resources/templates/authenticated.html new file mode 100644 index 00000000..e4756c01 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/authenticated.html @@ -0,0 +1,9 @@ + + + + + + +Только для аторизованных + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/error.html b/2022-05/spring-26/solution2/src/main/resources/templates/error.html new file mode 100644 index 00000000..f28b51df --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/error.html @@ -0,0 +1,9 @@ + + + + + + +Вам доступ запрещён! + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/index.html b/2022-05/spring-26/solution2/src/main/resources/templates/index.html new file mode 100644 index 00000000..9a8b9382 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/index.html @@ -0,0 +1,17 @@ + + + + + + +/public +
+/authenticated +
+/user +
+/manager +
+/admin + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/manager.html b/2022-05/spring-26/solution2/src/main/resources/templates/manager.html new file mode 100644 index 00000000..dd4a77af --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/manager.html @@ -0,0 +1,9 @@ + + + + + + +Доступ к MANAGER + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/public.html b/2022-05/spring-26/solution2/src/main/resources/templates/public.html new file mode 100644 index 00000000..77188469 --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/public.html @@ -0,0 +1,9 @@ + + + + + + +Доступен всем + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/success.html b/2022-05/spring-26/solution2/src/main/resources/templates/success.html new file mode 100644 index 00000000..4e2a37cd --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/success.html @@ -0,0 +1,9 @@ + + + + + + +Вы успешно вошли ! + + diff --git a/2022-05/spring-26/solution2/src/main/resources/templates/user.html b/2022-05/spring-26/solution2/src/main/resources/templates/user.html new file mode 100644 index 00000000..a794bc2d --- /dev/null +++ b/2022-05/spring-26/solution2/src/main/resources/templates/user.html @@ -0,0 +1,9 @@ + + + + + + +Доступ к USER + +