File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
java/webapp3/webapp3/security Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 41
41
<groupId >org.springframework.boot</groupId >
42
42
<artifactId >spring-boot-starter-data-jpa</artifactId >
43
43
</dependency >
44
- <dependency >
44
+ <!-- dependency>
45
45
<groupId>org.postgresql</groupId>
46
46
<artifactId>postgresql</artifactId>
47
- </dependency >
48
- <!-- dependency>
47
+ </dependency-- >
48
+ <dependency >
49
49
<groupId >com.h2database</groupId >
50
50
<artifactId >h2</artifactId >
51
51
<version >2.1.210</version >
52
- </dependency-- >
52
+ </dependency >
53
53
<dependency >
54
54
<groupId >org.springframework.boot</groupId >
55
55
<artifactId >spring-boot-starter-test</artifactId >
Original file line number Diff line number Diff line change @@ -69,20 +69,22 @@ protected void configure(HttpSecurity http) throws Exception {
69
69
70
70
http .authorizeRequests ().antMatchers (HttpMethod .DELETE , "/api/users/**" ).hasRole ("administrator" );
71
71
72
- //monitor
73
- http .authorizeRequests ().antMatchers (HttpMethod .GET , "/api/users/monitors/me" ).hasRole ("monitor" );
72
+
74
73
75
74
http .authorizeRequests ().antMatchers (HttpMethod .PUT , "/api/users/me" ).hasRole ("monitor" );
76
75
http .authorizeRequests ().antMatchers (HttpMethod .PUT , "/api/users/me/image/" ).hasRole ("monitor" );
77
76
http .authorizeRequests ().antMatchers (HttpMethod .PUT , "/api/users/monitors/{id}/image/" ).hasRole ("monitor" );
78
77
79
78
//member
80
- http .authorizeRequests ().antMatchers (HttpMethod .GET , "/api/users/members/me" ).hasRole ("monitor " );
79
+ http .authorizeRequests ().antMatchers (HttpMethod .GET , "/api/users/members/me" ).hasRole ("member " );
81
80
http .authorizeRequests ().antMatchers (HttpMethod .GET , "/api/users/members/statistics" ).hasRole ("member" );
82
81
83
82
http .authorizeRequests ().antMatchers (HttpMethod .PUT , "/api/users/me" ).hasRole ("member" );
84
83
http .authorizeRequests ().antMatchers (HttpMethod .PUT , "/api/users/me/image/" ).hasRole ("member" );
85
84
85
+ //monitor
86
+ http .authorizeRequests ().antMatchers (HttpMethod .GET , "/api/users/monitors/me" ).hasRole ("monitor" );
87
+
86
88
//exercise
87
89
//http.authorizeRequests().antMatchers(HttpMethod.GET,"/api/exercises/").hasRole("monitor");
88
90
Original file line number Diff line number Diff line change 1
1
spring.mustache.suffix =.html
2
2
logging.level.org.springframework.web =DEBUG
3
3
spring.h2.console.enabled =true
4
- # spring.datasource.url=jdbc:h2:mem:testdb
4
+ spring.datasource.url =jdbc:h2:mem:testdb
5
5
6
6
7
7
spring.jpa.properties.hibernate.format_sql =true
@@ -17,7 +17,7 @@ server.ssl.key-store= classpath:keystore.jks
17
17
server.ssl.key-store-password = password
18
18
server.ssl.key-password = secret
19
19
20
- spring.datasource.url =jdbc:postgresql://localhost/posts
20
+ # spring.datasource.url=jdbc:postgresql://localhost/posts
21
21
spring.datasource.username =postgres
22
22
spring.datasource.password =password
23
23
spring.jpa.hibernate.ddl-auto =create-drop
You can’t perform that action at this time.
0 commit comments