Acris has also the client "conditional" security. Have a look on: http://code.google.com/p/acris/wiki/SecurityClient
Just annotate you panel with @Secured(Grants.ROLE_ADMIN) protected VerticalPanel mainPanel; and it will displays only to users which has correct security permission. You can study more in the showcase: http://acris.googlecode.com/svn/trunk/acris-security-showcase Peter On 21. Júl, 00:46 h., seanrocket <seanrocketjohnc...@gmail.com> wrote: > I am running GWT2.0.4 and Spring Security 3.03. > > I am able to authenticate with Spring Security but have not found a > good way to conditionally render Widgets and Panels based on ROLES > from Spring Security. > > For example: In the StockWatcher program, if a user has a ROLE_ADMIN > then I want to allow that person to add a addPanel. But If the user > has a role such as ROLE_GUEST who is not a ROLE_ADMIN, that user > should not see the panel > > I would like to do something like: > public void onModuleLoad() { > ..... > // Assemble Main panel. > mainPanel.add(stocksFlexTable); > if(SpringSecurityRole == "ROLE_ADMIN"){ > mainPanel.add(addPanel); > } > mainPanel.add(lastUpdatedLabel); > ...... > } > I know UI conditional rendering can be easily accomplished using jsp > and the Spring Security tags (as shown below). But we don't want to > use jsp > > <sec:authorize access="hasRole('ROLE_ADMIN')"> > <input type="submit" value="Add" /> > </sec:authorize> > > I have searched gwt forums , google groups and other GWT book forum > and Spring book forums and have not found a good solution. > > I've tried the acris securityhttp://code.google.com/p/acris/wiki/Introduction > but the roles don't seem to come from Spring Security but rather its > own implementation. It uses Spring Security for server side security > not UI conditional rendering. UI conditional rendering ROLES come from > its own filter > sk.seges.acris.security.server.SessionRemoteServiceFilter and user > define Grants interface. > > I've also tried gwt-incubator > libhttp://code.google.com/p/gwt-incubator-lib/but that seems to only > cover authentication and no conditional rendering. > > I've seen some news feed about calling back to Spring Security but > didn't know how to accomplish the actual calls. > > DoCheckUserAuth checkAuth = new DoCheckUserAuth(); boolean b = > checkAuth.askServerAboutUser(); > if(b){ > RootPanel.get("formPoint").set(new PrivateForm);} > else > { > RootPanel.get("messagePoint").set(new Label("Please, pass > authorization")); > > Your help is much appreciated -- 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-tool...@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.