• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

[Spring Security]Grant authority when creating an account

 
Ranch Hand
Posts: 39
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!
reply
    Bookmark Topic Watch Topic
  • New Topic