• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

How @RoleAllowed handle higer privilege roles internally

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
          In my project @RolesAllowed is used as @RolesAllowed({ "EMPLOYEE }) for methods.But those methods also can be used with higher privilege roles like ADMIN, HR. In an enum roles are declared as ---



It's a web project and sping core is used here.
What can be the possible ways these roles are applied internally for those methods?
Thanks
 
Saloon Keeper
Posts: 26267
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that this is more of a Spring question than Java in General.

I'm not sure what Spring is providing, but the JEE standard roles don't have "higher" and "lower" privileges. You either have a role or you don't, and if you have at least one of the roles permitted for the resource, you can access the resource, otherwise you cannot (logical "OR" relationship).

But I'll post this to the Spring forum where they can give you information more specific to Spring.
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Tim, please provide the link posted in spring community so I can follow up.
Regards,
Abhra
 
Tim Holloway
Saloon Keeper
Posts: 26267
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abhra Kar wrote:Thanks a lot Tim, please provide the link posted in spring community so I can follow up.
Regards,
Abhra


I've already cross-linked it, so you don't need to do anything.
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic