This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Exceptions to a default security-constraint

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I’ve used Struts2 and Glassfish to create a web-app which has two user roles: user, and admin. I would like all actions to be constrained to the admin role by default, and a subset of the actions to be available to the "basic" user. I guess this can be achieved by for the admin-role. But, and here is the problem, I also have a login-action and a registration-action (register new users) which should be available for everybody, and the *-constraint will not allow this. So is there a way to create a security-constraint which applies to users that are not logged in? Is there a default user-role which applies to users that are not logged in? Or any other way to create an exception to a "default" security-constraint?

Or is the only solution to name all actions explicitly for all constraints, and leave out the register- and login-action (i.e. no "default" security-constraint)

Thanks, Anders
Evil is afoot. But this tiny ad is just an ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic