+ bot + notifications
This commit is contained in:
@@ -37,14 +37,9 @@ class SpaceService(
|
||||
private val tagRepo: TagRepo
|
||||
) {
|
||||
|
||||
suspend fun isValidRequest(spaceId: String): Space {
|
||||
val securityContextHolder = ReactiveSecurityContextHolder.getContext().awaitSingleOrNull()
|
||||
?: throw AuthException("Authentication failed")
|
||||
val authentication = securityContextHolder.authentication
|
||||
|
||||
val username = authentication.name
|
||||
// Получаем пользователя по имени
|
||||
val user = userService.getByUsername(username)
|
||||
|
||||
suspend fun isValidRequest(spaceId: String, user: User): Space {
|
||||
val space = getSpace(spaceId)
|
||||
|
||||
// Проверяем доступ пользователя к пространству
|
||||
|
||||
Reference in New Issue
Block a user