Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

[Spring Security]Grant authority when creating an account

 
Greenhorn
Posts: 28
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Is there a way for me to grant authority while creating a specific account? Now, depending on whether I have true / false (in my AppUser model is a class field boolean isProfessor;) or admin, the user gets the appropriate permissions in my implementation of UserDetailsService. It does not seem to me to be a correct and elegant solution. Can I add in the AppUser model something like "authoritiy" field and when creating set "who it will be"? STUDENT or PROFESSOR
Now it looks like:


Thank you for any advice!
 
This is my favorite show. And this is my favorite tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic