-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm planning to add Spring Security integration to my ZK web app.
Looking at the Spring Security configuration parameters there is a 'login' option that allows you to specify a login URL to present a login form. Instead of using a seperate URL, is it possible to create a popup modal login form instead?
In my own app a user may access various aspects of the web app, and is only prompted to login if they try to add/edit data. For instance: using the ZK 'intercept-event' approach I want to have a popup modal login form appear after they click on the 'add' buton.
@davout
like on other side i said. The simplest thing is to catch in the onClick$BtnAdd(Event event) with a
public void onClick$BtnAdd(Event event) { // if ( isAllowed("btnAdd") ){ if ( isAllowed("ROLE_USER") ){ // do something } else { // go to the login Executions.Redirect("/spring_security_login"); } }
whises
Stephan
hmm,
you can only secure the needed buttons.
The other way you would go is in the sample springSecurityContext.xml too.
Have a look at the end of the file.
xmlns:zksp="http://www.zkoss.org/2008/zkspring" ... <zksp:zk-event login-template-close-delay="5"> <zksp:intersept-event path"//**/btnAddThis event="onClick" access="IS_AUTHENTICATED_REMEMBERED" > <zksp:intersept-event path"/** event="onClick" access="IS_AUTHENTICATED_ANYNYMOUSLY" > </zksp:zk-event>
regards
Stephan
Asked: 2009-02-21 06:31:26 +0800
Seen: 561 times
Last updated: Feb 23 '09