mirror of https://github.com/usbharu/Hideout.git
fix: 投稿のスコープの設定を修正
This commit is contained in:
parent
0b63f95c17
commit
8746258104
|
@ -182,7 +182,8 @@ class SecurityConfig {
|
|||
builder.pattern("/api/v1/instance/**"),
|
||||
builder.pattern("/.well-known/**"),
|
||||
builder.pattern("/error"),
|
||||
builder.pattern("/nodeinfo/2.0")
|
||||
builder.pattern("/nodeinfo/2.0"),
|
||||
builder.pattern("/api/v1/accounts")
|
||||
).permitAll()
|
||||
it.requestMatchers(
|
||||
builder.pattern("/auth/**")
|
||||
|
@ -192,7 +193,9 @@ class SecurityConfig {
|
|||
.hasAnyAuthority("SCOPE_read", "SCOPE_read:accounts")
|
||||
it.requestMatchers(builder.pattern(HttpMethod.POST, "/api/v1/media"))
|
||||
.hasAnyAuthority("SCOPE_write", "SCOPE_write:media")
|
||||
it.anyRequest().permitAll()
|
||||
it.requestMatchers(builder.pattern(HttpMethod.POST, "/api/v1/statuses"))
|
||||
.hasAnyAuthority("SCOPE_write", "SCOPE_write:statuses")
|
||||
it.anyRequest().authenticated()
|
||||
}
|
||||
http.oauth2ResourceServer {
|
||||
it.jwt(Customizer.withDefaults())
|
||||
|
|
Loading…
Reference in New Issue