style: fix lint

This commit is contained in:
usbharu 2024-02-16 17:19:57 +09:00
parent 4a7152b771
commit 8d4785b002
4 changed files with 6 additions and 11 deletions

View File

@ -64,10 +64,9 @@ import java.security.interfaces.RSAPrivateKey
import java.security.interfaces.RSAPublicKey import java.security.interfaces.RSAPublicKey
import java.util.* import java.util.*
@EnableWebSecurity(debug = false) @EnableWebSecurity(debug = false)
@Configuration @Configuration
@Suppress("FunctionMaxLength", "TooManyFunctions") @Suppress("FunctionMaxLength", "TooManyFunctions", "LongMethod")
class SecurityConfig { class SecurityConfig {
@Bean @Bean
@ -246,9 +245,6 @@ class SecurityConfig {
authorize(anyRequest, authenticated) authorize(anyRequest, authenticated)
} }
oauth2ResourceServer { oauth2ResourceServer {
jwt { } jwt { }
} }
@ -384,14 +380,13 @@ class SecurityConfig {
SCOPE_admin:write > SCOPE_admin:write:ip_blocks SCOPE_admin:write > SCOPE_admin:write:ip_blocks
SCOPE_admin:write > SCOPE_admin:write:email_domain_blocks SCOPE_admin:write > SCOPE_admin:write:email_domain_blocks
SCOPE_admin:write > SCOPE_admin:write:canonical_email_blocks SCOPE_admin:write > SCOPE_admin:write:canonical_email_blocks
""".trimIndent() """.trimIndent()
) )
return roleHierarchyImpl return roleHierarchyImpl
} }
} }
@ConfigurationProperties("hideout.security.jwt") @ConfigurationProperties("hideout.security.jwt")
@ConditionalOnProperty(name = ["hideout.security.jwt.generate"], havingValue = "") @ConditionalOnProperty(name = ["hideout.security.jwt.generate"], havingValue = "")
data class JwkConfig( data class JwkConfig(

View File

@ -23,6 +23,7 @@ sealed class Page {
} }
companion object { companion object {
@Suppress("FunctionMinLength")
fun of( fun of(
maxId: Long? = null, maxId: Long? = null,
sinceId: Long? = null, sinceId: Long? = null,

View File

@ -92,9 +92,8 @@ class MastodonFilterApiController(
) )
} }
override fun apiV2FiltersGet(): ResponseEntity<Flow<Filter>> { override fun apiV2FiltersGet(): ResponseEntity<Flow<Filter>> =
return ResponseEntity.ok(mastodonFilterApiService.filters(loginUserContextHolder.getLoginUserId())) ResponseEntity.ok(mastodonFilterApiService.filters(loginUserContextHolder.getLoginUserId()))
}
override suspend fun apiV2FiltersIdDelete(id: String): ResponseEntity<Any> { override suspend fun apiV2FiltersIdDelete(id: String): ResponseEntity<Any> {
mastodonFilterApiService.deleteById(loginUserContextHolder.getLoginUserId(), id.toLong()) mastodonFilterApiService.deleteById(loginUserContextHolder.getLoginUserId(), id.toLong())