Fixed formatting.
This commit is contained in:
parent
2013c4b84b
commit
185f258b6f
@ -27,7 +27,8 @@ data class Site(
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
val id: Long = 0,
|
||||
val name: String){
|
||||
val name: String
|
||||
) {
|
||||
@OneToMany(fetch = FetchType.LAZY)
|
||||
val tutors: MutableSet<Tutor> = mutableSetOf()
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ interface TutorRepository: CrudRepository<Tutor, Long>
|
||||
|
||||
@Repository
|
||||
interface ObservationRepository : CrudRepository<Observation, Long>, JpaSpecificationExecutor<Observation> {
|
||||
|
||||
fun findBySiteAndDateBetween(site: Site, startDate: LocalDate, endDate: LocalDate): List<Observation>
|
||||
|
||||
fun findByTutorsAndDateBetween(tutor: Tutor, startDate: LocalDate, endDate: LocalDate): List<Observation>
|
||||
|
@ -19,7 +19,6 @@ import javax.servlet.ServletException
|
||||
import javax.servlet.http.HttpServletRequest
|
||||
import javax.servlet.http.HttpServletResponse
|
||||
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
class CustomWebSecurityConfigurerAdapter : WebSecurityConfigurerAdapter() {
|
||||
@ -57,8 +56,7 @@ class CustomWebSecurityConfigurerAdapter : WebSecurityConfigurerAdapter() {
|
||||
class MyBasicAuthenticationEntryPoint : BasicAuthenticationEntryPoint() {
|
||||
|
||||
@Throws(IOException::class, ServletException::class)
|
||||
override fun commence
|
||||
(request: HttpServletRequest, response: HttpServletResponse, authEx: AuthenticationException) {
|
||||
override fun commence(request: HttpServletRequest, response: HttpServletResponse, authEx: AuthenticationException) {
|
||||
response.addHeader("WWW-Authenticate", "Basic realm=\"$realmName\"")
|
||||
response.status = HttpServletResponse.SC_UNAUTHORIZED
|
||||
response.writer.println("HTTP Status 401 - " + authEx.message)
|
||||
|
Loading…
Reference in New Issue
Block a user