mpierse / ZipMynt

A Personal Finance Application
0 stars 4 forks source link

SERVER - Currently entities aren't specified by ID. (All users can see ALL transactions/ALL money accounts. #8

Open trtong opened 5 years ago

trtong commented 5 years ago

This can be changed in the respective controllers/repositories.

Easy fix.

trtong commented 5 years ago

This was addressed in the jhipster video on how to change this: https://www.youtube.com/watch?v=-VQ_SVkaXbs

We'll need to update the methods in the resource/repo's to check valid login and then grab by specific ID.

trtong commented 5 years ago
screen shot 2018-12-18 at 8 46 16 pm

A lot here, but focus on the entryRepository.findByBlogUserLoginOrderByDateDesc(SecurityUtils.getCurrentUserLogin().orElse(null), pageable);

Remember the custom JPA methods lecture? We can make sure specific accounts/transactions are shown by adding our own custom queries as such.