-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the wagio wiki!
Human Resource Management System
Requirements:
- open-jdk 8
- eclipse Neon: Eclipse IDE for Java Developers with Maven(http://www.eclipse.org/downloads/eclipse-packages/)
- install STS in eclipse Marketplace (Help -> Marketplace)
HowTo Create Database:
cat database/create_database.sql | mysql -u root -p
HowTo Configure Database in the project:
edit application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/organization
spring.datasource.username=root
spring.datasource.password=pass
HowTo Run:
right-click on MyApplication.java -> Run As -> Spring Boot App
Login:
username: some email from the database
password: all passwords are 'password', BCrypt encrupted in the database
REST API:
- GET http://localhost:8080/login
- GET http://localhost:8080/login?logout
- GET http://localhost:8080/user/members (shows all members of the organization, only users with Role ADMIN can access it, users with role MANAGER will see one level below)
- GET http://localhost:8080/user/member/ID (shows a member of the organization, users with Role ADMIN can see all, Role MANAGER can see himself and all team members, Role USER can see only himself)
- GET http://localhost:8080/user/member/ID/team (show one level down, ID must be a manager, Role ADMIN for all, Role MANAGER sees his direct team).
- GET http://localhost:8080/user/logged (shows member currently logged in)
BACKLOG:
- GET http://localhost:8080/user/member/ID/salary/YYYY/MM (salary spec, Role ADMIN for all, Role MANAGER for himself and the members of the team, Role USER for himself)
- GET http://localhost:8080/user/member/ID/report/YYYY/MM (report, Role ADMIN for all, Role MANAGER for himself and the members of the team, Role USER for himself)
- GET http://localhost:8080/user/member/ID/report/YYYY/MM?submit (Role USER submits his report, ID must be himself)
- GET http://localhost:8080/user/member/ID/report/YYYY/MM?reopen (Role USER reopens his report, ID must be himself)
- GET http://localhost:8080/user/member/ID/report/YYYY/MM?approve (Role MANAGER approves the report of a team member, ID must be a member of his team, report must be submitted, Role ADMIN can approve all reports)
- POST, PUT, DELETE for all mount paths
Links:
Spring Boot with MySQL: http://www.concretepage.com/spring-boot/spring-boot-rest-jpa-hibernate-mysql-example
HasRole example: http://www.baeldung.com/spring-security-expressions-basic
Get User in spring security: http://www.baeldung.com/get-user-in-spring-security
Registration with Spring Security plus complete guide about Captcha, etc: http://www.baeldung.com/spring-security-registration-password-encoding-bcrypt (http://www.programming-free.com/2015/09/spring-security-jdbc-authentication.html, http://www.programming-free.com/2015/09/spring-security-password-encryption.html)
Registration(simple example): https://medium.com/@gustavo.ponce.ch/spring-boot-spring-mvc-spring-security-mysql-a5d8545d837d