F
F
Fedor unknown2021-09-09 13:16:34
Software design
Fedor unknown, 2021-09-09 13:16:34

How to make a personal account for a user?

I'm making a regular todo list with authorization -> create/edit/delete tasks.
question: how can I implement so that there are two roles: admin and user
user - can create and see only his own tasks
admin - can see all user tasks?

was used: spring botot, Security, thymeleaf, Postgres

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-09-16
@turdubekov

It's not very clear what the problem is. The user (and admin) has an id (and if there are user groups, then the id of the user group). Depending on this id, in the query from the database we must select only tasks with our user id in the creator field, or all tasks if it is admin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question