You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Boyce, Keith Garry" <Ke...@bcbsma.com> on 2005/06/03 19:00:02 UTC

Profiler problems....


After receiving some help I implemented the following profiling rules to
default installation:

insert into PRINCIPAL_RULE_ASSOC values ( '*', 'page', 'the-rule' );

update PRINCIPAL_RULE_ASSOC
set rule_id = 'the-rule'
where principal_name = 'guest'
  and locator_name='page'

 insert into PROFILING_RULE values ('the-rule',
 'org.apache.jetspeed.profiler.rules.impl.RoleFallbackProfilingRule',
 'A rule based on role fallback algorithm with specified subsite and
home page');

 insert into RULE_CRITERION values (500, 'the-rule', 0,
  'navigation', 'navigation', 'theruledir', 2);
 insert into RULE_CRITERION values (501, 'the-rule', 1,
  'role', 'role', null, 2);

The intended effect wat that all users to the portal would receive files
in dir __theruledir except guest which would receive files in
_user/guest/__theruledir

This doesn't appear to work.. Currently guest appears to be receiving
files from __theruledir and if I log in as user the portal displays
pages from the default desktop instead of the intended dir...

Any  ideas?

Thanks,
Garry

This message is a PRIVATE communication.
If you are not the intended recipient, please do not read, copy,
or use it, and do not disclose it to others. Please notify the
sender of the delivery error by replying to this message, and then
delete it from your system. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Profiler problems....

Posted by Randy Watler <wa...@wispertel.net>.
Garry,

>insert into PRINCIPAL_RULE_ASSOC values ( '*', 'page', 'the-rule' );
>
>update PRINCIPAL_RULE_ASSOC
>
>set rule_id = 'the-rule'
>where principal_name = 'guest'
>  and locator_name='page'
>
> insert into PROFILING_RULE values ('the-rule',
> 'org.apache.jetspeed.profiler.rules.impl.RoleFallbackProfilingRule',
> 'A rule based on role fallback algorithm with specified subsite and
>home page');
>
> insert into RULE_CRITERION values (500, 'the-rule', 0, 'navigation', 'navigation', 'theruledir', 2);
> insert into RULE_CRITERION values (501, 'the-rule', 1, 'role', 'role', null, 2);
>
>The intended effect wat that all users to the portal would receive files
>in dir __theruledir except guest which would receive files in
>_user/guest/__theruledir
>
So close. Two minor problems here:

1. The rule does not specify a user criteria... only roles. So, you 
might want to try something like:

insert into RULE_CRITERION values (500, 'the-rule', 0, 'navigation', 'navigation', '/__theruledir', 2);
insert into RULE_CRITERION values (501, 'the-rule', 1, 'group.role.user', 'user', null, 2);
insert into RULE_CRITERION values (502, 'the-rule', 2, 'path', 'path', 'default-page', 0);

2. The rule criterions are processed in order, (excluding path variants), so
   /__theruledir prefix is always first in the path. Accordingly, 'guest' user
   pages should appear in /__theruledir/_user/guest.

Finally, if you still want roles to also be found in 
/__theruledir/_role/<role name> dirs, you will probably
want something like this:

insert into RULE_CRITERION values (500, 'the-rule', 0, 'navigation', 'navigation', '/__theruledir', 2);
insert into RULE_CRITERION values (501, 'the-rule', 1, 'group.role.user', 'user', null, 2);
insert into RULE_CRITERION values (502, 'the-rule', 2, 'navigation', 'navigation', '/__theruledir', 2);
insert into RULE_CRITERION values (503, 'the-rule', 3, 'role', 'role', null, 2);
insert into RULE_CRITERION values (504, 'the-rule', 4, 'path', 'path', 'default-page', 0);

BTW, using '/__theruledir' might be easier to read than just 
'theruledir'. Both, as well as '/theruledir', are
all equivalent configurations and resultin the use of the /__theruledir 
path..

Randy



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org