*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 1footer2.1K
wm.wicket.pages.FooterPanel2footer:About1.3K
org.apache.wicket.markup.html.link.PageLink3footer:ShopList
1.3Korg.apache.wicket.markup.html.link.PageLink4footer:Terms
1.3Korg.apache.wicket.markup.html.link.PageLink5
globalFeedback1.6Korg.apache.wicket.markup.html.panel.FeedbackPanel
6globalFeedback:feedbackul5K
org.apache.wicket.markup.html.WebMarkupContainer7
globalFeedback:feedbackul:messages5K
org.apache.wicket.markup.html.list.ListView[]8header3.7K
wm.wicket.pages.HeaderPanel9header:Comment1.4K
org.apache.wicket.markup.html.link.PageLink10header:Home1.4K
org.apache.wicket.markup.html.link.PageLink11
header:ManageCenter1.4Korg.apache.wicket.markup.html.link.PageLink
12header:ShareShop1.3K
org.apache.wicket.markup.html.link.PageLink13header:UserManual
1.3Korg.apache.wicket.markup.html.link.PageLink14
header:logoff5Korg.apache.wicket.markup.html.link.Link15
header:toCreateUserAccount2K
org.apache.wicket.security.components.markup.html.links.SecurePageLink
16header:username420 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