save-cloud icon indicating copy to clipboard operation
save-cloud copied to clipboard

Fetching user's role

Open nulls opened this issue 2 years ago • 0 comments

User has role in database which contains globalRole. But we fetch this value from Spring's authentication object. Need to rework it and store in a single format it and take all values from database.

Spring authentication is only for Spring checking when we mark endpoints by Spring Security Annotations

Yes and no. GlobalRole is not simple set from role - basically enriched from authority. But initial value stored in User.role, yes.

But in this comment I am pointing that globalRole is not set in UserDetails directly and details are only enriched later with this value on the frontend with a separate request

Originally posted by @akuleshov7 in https://github.com/saveourtool/save-cloud/pull/2536#discussion_r1315544917

nulls avatar Sep 05 '23 08:09 nulls