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

View File

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

View File

@ -13,4 +13,4 @@ class RoleHierarchyAuthorizationManagerFactory(private val roleHierarchy: RoleHi
hasAuthority.setRoleHierarchy(roleHierarchy)
return hasAuthority
}
}
}

View File

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