DEV Community

Keltouma INDTAHER
Keltouma INDTAHER

Posted on

How to add roles for user while user registration form angular

I'm working on a Spring Boot based web application in Java. I'm trying to create admin/user registration for my application. To be honest this is my first application and I don't really know how to add user roles while registration in front end whereas I did it in back end role added without problem. I've searched about this issue, but no one helps me how to add roles.

In my database it added like user how ever the input are.

If someone tell me you should add the roles in constructor's user, the role in user is Set Role> while input value is Set String> it should convert it first to a Set Role> and add it to user.setRole(x) then I can use it but how can I use it in front end? that's my problem.

link contains part of code : https://stackoverflow.com/questions/61392221/how-to-add-roles-for-user-while-user-registration-form-angular

Top comments (0)