Yes, obviously you had better check the role on the client and on the
server.  It is best if you use a shared class (one that is compiled to
JS and is also available as Java on the server) to do this.

On May 21, 6:29 am, Magius <antonio.diaz....@gmail.com> wrote:
> You can create a RPC to ask the server what is the current user role.
>
> You'll need to create a session when the user creates a new session
> and then you can store inside some user data like the login,
> profile, ...
>
> For a stronger security, you'd have to validate in server RPCs that
> the current profile is authorised to execute this RPC. It's not secure
> to rely only on the button because it can be cracked easily.
>
> On May 21, 4:00 am,hazy1<matt.egyh...@gmail.com> wrote:
>
> > Send the role information to your GWT client side application.
>
> > On May 20, 1:38 am, Chetan <chetan.minaj...@gmail.com> wrote:
>
> > > Hi,
>
> > > I am new to GWT.We have a requirement to hide a button based on the
> > > role of the user.
> > > We are able to get the correct data from the database based on SOP
> > > statements but invariably it is getting overwritten elsewhere.
> > > Is there a way where I can add this role that we get from the DB to
> > > add it into session and use that value to hide the button on the form?
> > > If so can you please let us know with a snippet.Another problem is how
> > > to access the session variable in our Panel in which this button is to
> > > be hidden.
>
> > > It is seemingly an extremely trivial requirement but we have spent
> > > quite sometime to understand how the existing application works but
> > > not able to make much headway.
> > > Would appreciate if some one from the community can help us out here.
>
> > > Regards,
> > > Chetan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to