-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
backend/src/main/java/de/itstimetoforget/backend/rest/repository/CustomerRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package de.itstimetoforget.backend.rest.repository; | ||
|
||
import de.itstimetoforget.backend.rest.entity.Customer; | ||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface CustomerRepository extends JpaRepository<Customer, Long> { | ||
|
||
} |
2 changes: 2 additions & 0 deletions
2
backend/src/main/java/de/itstimetoforget/backend/rest/repository/EmployeeRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package de.itstimetoforget.backend.rest.repository; | ||
|
||
import de.itstimetoforget.backend.rest.entity.Employee; | ||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface EmployeeRepository extends JpaRepository<Employee, Long> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/de/itstimetoforget/backend/rest/repository/PasswordRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package de.itstimetoforget.backend.rest.repository; | ||
|
||
import de.itstimetoforget.backend.rest.entity.Password; | ||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface PasswordRepository extends JpaRepository<Password, Long> { | ||
} |
14 changes: 14 additions & 0 deletions
14
.../src/main/java/de/itstimetoforget/backend/rest/security/SpringSecurityAuthorProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.itstimetoforget.backend.rest.security; | ||
|
||
import org.javers.spring.auditable.AuthorProvider; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.security.core.Authentication; | ||
import org.springframework.security.core.context.SecurityContextHolder; | ||
|
||
public class SpringSecurityAuthorProvider implements AuthorProvider { | ||
@Override | ||
public String provide() { | ||
Authentication auth = SecurityContextHolder.getContext().getAuthentication(); | ||
return ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters