1 Reply Latest reply on Jun 1, 2011 1:55 AM by nigiyan

    How to restrict access to entity getters and setters

    h3m3r

      Hello,


      is it possible to restrict acces to Entity getters and setters?


      I try an @Restrict annotation, but it has no effect. Getters and Setters can be stil called from JSF page for everyone.


      @Column(name = "name", nullable = false, length = 30)
      @NotNull
      @Length(max = 30)
      @Restrict("#{s:hasRole('admin')}")
      public String getName() {
           return this.name;
      }
      



      Thank you very much for response, Vaclav