Results 1 to 5 of 5

Thread: Restricting the update of info

  1. #1
    Join Date
    Mar 2007
    Location
    Toronto, ON
    Posts
    69

    Default Restricting the update of info

    Hello;

    Maybe this is a security question.

    Basically I have a set of forms.

    I want users to be able to fill a value in once. After that they cannot change that value in the form.

    Admins will be able to update any value in the form.

    I think there will be a security component involved (I am integrating Acegi as my security layer). But I am trying to figure out what part of the the Spring MVC will be involved. Should I do this with a form wizard? If there a feature in the form tld I can leverage? Maybe someone can point me in the right direction.

    Thanks!

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Does this want to be in the web layer? Yes you want to disable the field so the value can't be re-entered but I would have also thought want to secure this in the business layer. It's a business rule so it would seem logical.

  3. #3
    Join Date
    Mar 2007
    Location
    Toronto, ON
    Posts
    69

    Default

    Yes, business layer makes more sense. I am guessing this is in the wrong forum now. I have no idea where to start with this task (I am still pretty new with Spring). Where would I start on something like this?

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    One way to do it would be to make the object immutable. Obviously you can't set the property as final if you are using Hibernate, but hidding the setter and setting the value in the constructor would do it.

  5. #5
    Join Date
    Mar 2007
    Location
    Toronto, ON
    Posts
    69

    Default

    Ok, but the catch is, I want Admins to be able to edit this data. Only the regular users would have this update restriction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •