Ok, I got the valve to work.
The problem it turns out was that while I had added the "unconsented"
role to the user, I had to change his page profiling rule from that of
role-fallback to the rule I had created in the j2-admin (as described in
my message to this list 16/10/2008).
So we don't neeed to aply the "unconsented" role to the user, but apply
rule that will control the user's access until he signs the consent form
and at that time change his profiling rule from 'roleCheckRedirectRule'
to 'role-fallback'.
David Dyer wrote:
See comments inline:
David Sean Taylor wrote:
Ok, removed jetspeed-portal.jar and jetspeed-security.jar from
shared lib. Added the RoleCheckValve jar to {Jetspeed_home}/WEB-INF/lib
Set all org.apache.jetspeed packages to debug level.
Still no joy.
Some logging:
Sounds like its getting into the valve:
2008-10-16 15:41:03,592 [main] DEBUG
org.apache.jetspeed.security.impl.RoleCheckValve - instantiating
RoleCheckValve with arg roleToCheck=unconsented
yes, as I said, at Tomcat's startup it instantiates the RoleCheckValve
bean.
So what happens next, does it your valve execute the redirect?
No the valve never shows up again the log after instantiation. It does
have several logging statements within the invoke and all jetspeed
packages are set to log at debug level.
This line shows in the log just before I log the roleToCheck argument.
2008-10-20 14:38:26,038 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory -
Creating instance of bean 'roleCheckValve' with merged definition
[Root bean: class [org.apache.jetspeed.security.impl.RoleCheckValve];
scope=singleton; abstract=false; lazyInit=false;
autowireCandidate=false; autowireMode=0; dependencyCheck=0;
factoryBeanName=null; factoryMethodName=null;
initMethodName=initialize; destroyMethodName=null; defined in
ServletContext resource [/WEB-INF/assembly/pipelines.xml]]
Note the autowireCandidate attribute = false, all the other pipeline
beans have this set to true I believe. Certainly the localization
valve, the capabilities valve and the portalURL valve all do. But I
can't see anything in the pipelines.xml that looks wrong.
i'm attaching my pipelines.xml, I can attach the jetspeed log, but at
9000+ lines just for a startup and login, I'm guessing you probably
don't want me to.
Either put more debug statements in or attach your code to a debugger
and find out
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.549 / Virus Database: 270.8.1/1734 - Release Date: 20/10/2008 7:25 AM
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]