• 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

SpEL with java spring annotations for spring security

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

I am new for SpEL. Even though I am new for it, I want to use it to implement attribute-based access control by using ACL and SpEL. But I failed to go further because of my SpEL limitation. I hope you can help me a little bit how to handle the following problem.

Consider the following expressions to secure the method 'edit'.


Here, what I want to do is securing the method 'edit' by using the two SpELs. the first expression, that is, hasPermission(#data, 'WRITE' works fine, because I am using ACL defined in XML file. But for the 2nd expression I am using database that stores user details of the class 'User'. Assume that I have member variable 'name' for the 'User' class and its corresponding getter and setter methods. I can retrieve values for the 'name' variable from DB. But I couldn't able to pass those values in the SpEL expression above, or is the problem arise from the way that I used to compare the two values?. I am not using XML definition for the 2nd expression, I have XML only for for the first expression, that is for the ACL.

Can you provide me some information please? Thanks in advance for your cooperation!
 
eyasu getahun
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about the text structure, I am new for this site.
 
I am going to test your electrical conductivity with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic