diff --git a/src/main/kotlin/uk/co/neviyn/projectplanner/Entities.kt b/src/main/kotlin/uk/co/neviyn/projectplanner/Entities.kt index d4c259a..80702b7 100644 --- a/src/main/kotlin/uk/co/neviyn/projectplanner/Entities.kt +++ b/src/main/kotlin/uk/co/neviyn/projectplanner/Entities.kt @@ -30,7 +30,7 @@ open class User( ) var projects: MutableSet = mutableSetOf(), @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var id: Long? = null -) {} +) @Entity class Project( diff --git a/src/main/kotlin/uk/co/neviyn/projectplanner/Repositories.kt b/src/main/kotlin/uk/co/neviyn/projectplanner/Repositories.kt index ef6004d..7b4dbfb 100644 --- a/src/main/kotlin/uk/co/neviyn/projectplanner/Repositories.kt +++ b/src/main/kotlin/uk/co/neviyn/projectplanner/Repositories.kt @@ -3,19 +3,19 @@ package uk.co.neviyn.projectplanner import org.springframework.data.repository.CrudRepository import java.time.Instant -interface UserRepository : CrudRepository{ +interface UserRepository : CrudRepository { fun findByUsername(username: String): User? - fun findByIdNotIn(ids: List) : List + fun findByIdNotIn(ids: List): List } -interface ProjectRepository : CrudRepository{} +interface ProjectRepository : CrudRepository -interface EventRepository : CrudRepository{ - fun findByStartAfterAndProject(start: Instant, project: Project) : Set - fun findByEndBeforeAndProject(end: Instant, project: Project) : Set - fun findByStartAfterAndEndBeforeAndProjectIs(start: Instant, end: Instant, project: Project) : Set +interface EventRepository : CrudRepository { + fun findByStartAfterAndProject(start: Instant, project: Project): Set + fun findByEndBeforeAndProject(end: Instant, project: Project): Set + fun findByStartAfterAndEndBeforeAndProjectIs(start: Instant, end: Instant, project: Project): Set } -interface TagRepository : CrudRepository{} +interface TagRepository : CrudRepository -interface CommentRepository : CrudRepository{} \ No newline at end of file +interface CommentRepository : CrudRepository \ No newline at end of file diff --git a/src/main/kotlin/uk/co/neviyn/projectplanner/Security.kt b/src/main/kotlin/uk/co/neviyn/projectplanner/Security.kt index 34294be..8b45c0b 100644 --- a/src/main/kotlin/uk/co/neviyn/projectplanner/Security.kt +++ b/src/main/kotlin/uk/co/neviyn/projectplanner/Security.kt @@ -64,7 +64,7 @@ class UserDetailsServiceImpl @Autowired constructor(val userRepository: UserRepo @Configuration @EnableGlobalMethodSecurity(prePostEnabled = true) -class MethodSecurityConfig @Autowired constructor(val userRepository: UserRepository, val customPermissionEvaluator: CustomPermissionEvaluator) : GlobalMethodSecurityConfiguration() { +class MethodSecurityConfig @Autowired constructor(val customPermissionEvaluator: CustomPermissionEvaluator) : GlobalMethodSecurityConfiguration() { override fun createExpressionHandler(): MethodSecurityExpressionHandler { val expressionHandler = DefaultMethodSecurityExpressionHandler() diff --git a/src/main/resources/templates/fragments.html b/src/main/resources/templates/fragments.html index 1bb2097..2ad3444 100644 --- a/src/main/resources/templates/fragments.html +++ b/src/main/resources/templates/fragments.html @@ -5,33 +5,38 @@ Base Title - + - - + +
- +
diff --git a/src/main/resources/templates/landing.html b/src/main/resources/templates/landing.html index f32468f..fcfdbd6 100644 --- a/src/main/resources/templates/landing.html +++ b/src/main/resources/templates/landing.html @@ -7,7 +7,7 @@
- landing page + landing page
@@ -24,8 +24,8 @@
diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 7fdca85..a4817af 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -19,16 +19,16 @@
- +
- +
- +
diff --git a/src/main/resources/templates/profile.html b/src/main/resources/templates/profile.html index cf2728a..3de4850 100644 --- a/src/main/resources/templates/profile.html +++ b/src/main/resources/templates/profile.html @@ -12,10 +12,10 @@
-
+
- +
Username @@ -31,14 +31,14 @@

Please enter your existing password to update your profile.

Existing Password - +
- +
diff --git a/src/main/resources/templates/project.html b/src/main/resources/templates/project.html index e62bec4..930958d 100644 --- a/src/main/resources/templates/project.html +++ b/src/main/resources/templates/project.html @@ -7,17 +7,17 @@ - - + + @@ -184,7 +186,7 @@
@@ -217,10 +219,15 @@ @@ -240,7 +247,8 @@
-
diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/register.html index daeacf4..10f84e8 100644 --- a/src/main/resources/templates/register.html +++ b/src/main/resources/templates/register.html @@ -12,29 +12,33 @@
-
+
- - + +
Please enter an email address.
- - + +
Please enter a username.
- - + +
Please enter a password.
- +
@@ -44,7 +48,7 @@ 'use strict' // Fetch all the forms we want to apply custom Bootstrap validation styles to - var forms = document.querySelectorAll('.needs-validation') + let forms = document.querySelectorAll('.needs-validation') // Loop over them and prevent submission Array.prototype.slice.call(forms)