Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 27933
198
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: 27933
198
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.
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic