PDA

View Full Version : Using Acegi


titiwangsa
Jul 17th, 2007, 09:31 AM
hello to all
quick question.
i have a page
lets call it page1.jsp
on page1.jsp
there are 5 buttons
but if you are not logged in, you can only see 4

so
lets say user is not logged in.
user goes to page1.jsp
user sees 4 buttons
user has to login to see 5 buttons
so user logs in
but when user logs in,
user goes to the default main menu page
so user has to navigate back to page1.jsp

anybody has any idea how i can do this
- view page1.jsp as unauthenticated.
- login
- upon login i get back view1.jsp, (the same location) but since there are acegi codes in the jsp, i see more than what i saw before the authentication process.

dr_pompeii
Jul 17th, 2007, 01:34 PM
hello

you should think acegi working with url address instead of buttons


if you can post your code , maybe can help us,i want to see how you control the access buttons, i am little confuse

regards

titiwangsa
Jul 17th, 2007, 08:18 PM
basically
page1.jsp can be viewed as an authenticated user or non-authenticated user
there is a login link (if the user is unauthenticated)
when the user logs in
the user sees page1.jsp again

i want this to be true for page2.jsp and pagexxx.jsp

example
----------------------------------
PAGE 1
Hello
[Eat] [Drink]
[LOGIN]
----------------

then clicks login
-----------
Id: [ ]
Password: [ ]
[Submit]
----------

then the user sees page 1 again
----------------------------------
PAGE 1
Hello Mr Anderson.
[Eat] [Drink] [Take Blue Pil] [Take Red Pil]
[LOGOUT]
----------------


something like that