*Can you check which block is executed, the if or the else.
*the else block code will never execute after login in
if i change BaseSecurePage class extends from WebPage(same as BasePage), the
link will be visible.
when turn on wicket debug detail information show the link object is exist,
but not render.
Page
[Page class = wm.wicket.pages.ManageCenterPage, id = 25, version = 0]:
# Path Size Type Model Object 1 footer 2.1K
wm.wicket.pages.FooterPanel 2 footer:About 1.3K
org.apache.wicket.markup.html.link.PageLink 3 footer:ShopList
1.3K org.apache.wicket.markup.html.link.PageLink 4 footer:Terms
1.3K org.apache.wicket.markup.html.link.PageLink 5
globalFeedback 1.6K org.apache.wicket.markup.html.panel.FeedbackPanel
6 globalFeedback:feedbackul 5K
org.apache.wicket.markup.html.WebMarkupContainer 7
globalFeedback:feedbackul:messages 5K
org.apache.wicket.markup.html.list.ListView [] 8 header 3.7K
wm.wicket.pages.HeaderPanel 9 header:Comment 1.4K
org.apache.wicket.markup.html.link.PageLink 10 header:Home 1.4K
org.apache.wicket.markup.html.link.PageLink 11
header:ManageCenter 1.4K org.apache.wicket.markup.html.link.PageLink
12 header:ShareShop 1.3K
org.apache.wicket.markup.html.link.PageLink 13 header:UserManual
1.3K org.apache.wicket.markup.html.link.PageLink 14
header:logoff 5K org.apache.wicket.markup.html.link.Link 15
header:toCreateUserAccount 2K
org.apache.wicket.security.components.markup.html.links.SecurePageLink
16 header:username 420 bytes
org.apache.wicket.markup.html.basic.Label - nhsoft
On Mon, May 5, 2008 at 1:27 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> The log indicates all requested permissions are granted. In fact the
> only thing that raises my eyebrow in the log is :
> 05-04 21:14:10.000[UserAccountServiceImpl.java:40 :ERROR]
> org.springframework.orm.ObjectRetrievalFailureException: Object of
> class [wm.model.UserAccount] with identifier [nhsoft]: not found
> 05-04 21:14:10.046[ LoggerListener.java:60 :WARN ] Authentication
> event AuthenticationSuccessEvent: nhsoft; details: null
> which might indicate a problem with acegi or your configuration.
> So i don't think swarm is the problem here. I did notice however an if
> statement in HeaderPanel
> Authentication authentication =
> SecurityContextHolder.getContext().getAuthentication();
> if(authentication != null)
> .....
> else
> ....
>
> In the else block you are hiding both links, which matches the
> problems you are seeing.
> Theoretically if you only use this panel on pages extending from
> SecureBasePage, the Authentication should never be null. If it is,
> this indicates a synchronization problem between swarm and acegi, both
> keep separate records of who is logged in and what there
> permissions/grantedAuthorities are.
>
> Can you check which block is executed, the if or the else.
>
> Maurice
>
> On Sun, May 4, 2008 at 3:28 PM, 宁波新希望信息技术有限公司 -- 俞宏伟
> <[EMAIL PROTECTED]> wrote:
> > -Your hive file has permissions which continue over the next line, i
> assume
> > this is caused by copy pasting the file here and that in the actual hive
> > file each permission is on exactly 1 line.
> > yes, my hive file for each permission is on exactly 1 line(nabble forum
> show
> > correctly)
> >
> >
> > -I assume all the page classes in the policy file extend this
> > BaseSecurePage of yours
> > yes
> >
> >
> > -Can you turn on debug logging for BasicHive and PolicyFileHiveFactory,
> i
> > would like to see if you get any messages about the user not having
> > permissions for the links and messages about skipped policy file lines
> > yes, i turn on debug for org.apache.wicket.security,but i can not found
> any
> > skipped tips message. attachment file for detail log information
> >
> >
> > -Are you using 1.3.0 or 1.3-SNAPSHOT?
> > version is 1.3.0
> >
> >
> > -According to the policy file these permissions are granted to any
> > authenticated user, can you confirm you indeed have an authenticated
> user.
> > yes
> >
> >
> > -Can you show me your application, in particular the methods swarm
> requires
> > you to implement
> > my swarm implement is acegi+swarm from swarm acegi example. i attach
> source
> > code (swarm.implement.src.zip)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
--
新希望软件---俞宏伟
Addr:宁波海曙新高路47弄7号四楼
Site: http://www.nhsoft.cn
GTalk:[EMAIL PROTECTED] <[EMAIL PROTECTED]>
MSN: [EMAIL PROTECTED]
Tel: 0574-87280538
Fax: 0574-56226219
Mobile:13780081921