Skip to content

Commit

Permalink
Added user authorization in Cosv
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheshiriks committed Jan 23, 2024
1 parent 800314b commit e48761d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.saveourtool.save.backend.repository

import com.saveourtool.save.entities.Organization
import com.saveourtool.save.entities.OrganizationStatus
import com.saveourtool.save.repository.ValidateRepository
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.saveourtool.save.backend.repository

import com.saveourtool.save.entities.User
import com.saveourtool.save.info.UserStatus
import com.saveourtool.save.repository.ValidateRepository
import com.saveourtool.save.spring.repository.BaseEntityRepository
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ValidateRepository {
* @param name of organization or user
* @return 1 if [name] is valid, 0 otherwise
*/
@Query("""select if (count(*) = 0, true, false) from save_cloud.high_level_names where name = :name""", nativeQuery = true)
@Query("""select if (count(*) = 0, true, false) from high_level_names where name = :name""", nativeQuery = true)
fun validateName(@Param("name") name: String): Long

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import reactor.core.scheduler.Schedulers
* Service for user
*/
@Service
@Suppress("LongParameterList")
class UserService(
private val userRepository: UserRepository,
private val organizationRepository: OrganizationRepository,
Expand Down

0 comments on commit e48761d

Please sign in to comment.