void you mean just an empty page renderd?
This was the case but with the refactorings checkAccess() is called but currently we don't do really anything
with the returned boolean. That is a bit wrong..

this is the code:
case CHECK_ACCESS:
                {
                    // manually set step to check access

                    IRequestTarget target = getRequestTarget();

                    if (target instanceof IAccessCheck)
                    {
                        ((IAccessCheck)target).checkAccess(this);
                    }

                    // check access or earlier (like in a component constructor)
                    // might
                    // have called setRequestTarget. If that is the case, put
                    // that one
                    // on top; otherwise put our resolved target on top
                    IRequestTarget otherTarget = getRequestTarget();
                    if (otherTarget != target)
                    {
                        // The new target has to be checked again set the
                        // current step back one.
                        currentStep = CHECK_ACCESS - 1;
                        // swap targets
                        requestTargets.pop();
                        requestTargets.push(target);
                        requestTargets.push(otherTarget);
                    }
                    break;
                }

and i think it should be something like this:

case CHECK_ACCESS:
                {
                    // manually set step to check access

                    IRequestTarget target = getRequestTarget();
 
                    boolean access = true;
              
                    if (target instanceof IAccessCheck)
                    {
                        access = ((IAccessCheck)target).checkAccess(this);
                    }

                    // check access or earlier (like in a component constructor)
                    // might
                    // have called setRequestTarget. If that is the case, put
                    // that one
                    // on top; otherwise put our resolved target on top
                    IRequestTarget otherTarget = getRequestTarget();
                    if (otherTarget != target)
                    {
                        // The new target has to be checked again set the
                        // current step back one.
                        currentStep = CHECK_ACCESS - 1;
                        // swap targets
                        requestTargets.pop();
                        requestTargets.push(target);
                        requestTargets.push(otherTarget);
                    }
                    else if(!access)
                    {
                          // We didn't have access but still the targets are the same...
                          // We should redirect to something else...
                    }
                    break;
                }

On 1/9/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
so why isnt this really void?

-Igor


On 1/9/06, Johan Compagner < [EMAIL PROTECTED]> wrote:
What do you expect it should do?
Just an empty page? Or an internal error page?

If you look at the signin examples you see that we set a response page:
redirectToInterceptPage(newPage(SignIn2.class));

So if you don't set any response page but do return false.
What should the framework do?

johan


On 1/9/06, pepone pepone < [EMAIL PROTECTED]> wrote:
wicket-1.2-20060108
Page renders when checkAccess returns false

http://sourceforge.net/tracker/index.php?func=detail&aid=1400643&group_id=119783&atid=684975
--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



Reply via email to