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 Marina <pp...@yahoo.com> on 2004/12/28 17:42:07 UTC

How to create a custom profiling rule?

Hi!

I'm trying to create a new profiling rule for a user.
>From looking at the examples and the DB tables it
seems that all I need to do is to add new entries to
the PRINCIPAL_RULE_ASSOC and RULE_CRITERION tables.
The first table's structure and purpose are quite
clear. If I want to create a new 'dce_rule'(for both
pages and docsets) for the 'dce_admin' user I think I
should do the following:

insert into PRINCIPAL_RULE_ASSOC values ('dce_admin',
page, 'dce_rule');
insert into PRINCIPAL_RULE_ASSOC values ('dce_admin',
docset, 'dce_rule');

Then, I need to add new rule criteria for the new rule
into the RULE_CRITERION table. I looked at the current
values there and I am not sure how they are used to
define profiling rules. More specifically, I see, for
example, the following entries for the 'role-group'
rule:

	<row>
		<CRITERION_ID>11</CRITERION_ID>
		<RULE_ID>role-group</RULE_ID>
		<FALLBACK_ORDER>0</FALLBACK_ORDER>
		<REQUEST_TYPE>role</REQUEST_TYPE>
		<NAME>role</NAME>
		<VALUE></VALUE>
		<FALLBACK_TYPE>2</FALLBACK_TYPE>
	</row>
	<row>
		<CRITERION_ID>12</CRITERION_ID>
		<RULE_ID>role-group</RULE_ID>
		<FALLBACK_ORDER>1</FALLBACK_ORDER>
		<REQUEST_TYPE>navigation</REQUEST_TYPE>
		<NAME>navigation</NAME>
		<VALUE>/</VALUE>
		<FALLBACK_TYPE>2</FALLBACK_TYPE>
	</row>
	<row>
		<CRITERION_ID>13</CRITERION_ID>
		<RULE_ID>role-group</RULE_ID>
		<FALLBACK_ORDER>2</FALLBACK_ORDER>
		<REQUEST_TYPE>group</REQUEST_TYPE>
		<NAME>group</NAME>
		<VALUE></VALUE>
		<FALLBACK_TYPE>2</FALLBACK_TYPE>
	</row>

I aslo know (thanks to Randy's explanation) that the
search paths returned by this rule are:
/_role/rolename
/_group/groupname
/

However, I am not sure how and what fields from the
RULE_CRITERION table are used to construct these
paths. Are 'Name' or 'Value' fields used ? They are
null's for group and role  request_type , but '/' for
the navigation one. What are the 'path.session',
'navigation', and other REQUEST_TYPEs? And where does
FALLBACK_TYPE come into play?
 
Basically, my question is: what is the meaning of the
fields of this table and how are they used?

Thanks!
Marina

P.S. I think I sent this e-mail to the development
list as well - sorry about that, it was done my mistake


		
__________________________________ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

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


Re: How to create a custom profiling rule?

Posted by Marina <pp...@yahoo.com>.
 One more related question:

  It seems that profiling rules are assigned to the
users based on the user names. At least this is what I
see in the PRINCIPAL_RULE_ASSOC table - I created a
new user, 'dce_admin', and assigned a 'security'
profiling rule to it, and the ("dce_admin", "page",
"security") values got inserted into the
PRINCIPAL_RULE_ASSOC table. So, I assumed that the
'PRINCIPAL_NAME' in this table is in fact a username.

  Now my question: how could I assign a profiling rule
to a rolename, not a username? 
For example, I might want all users with the
'dce_admin_role'  role to use the 'security' rule.

Thanks!
Marina

--- Marina <pp...@yahoo.com> wrote:

> Hi!
> 
> I'm trying to create a new profiling rule for a
> user.
> From looking at the examples and the DB tables it
> seems that all I need to do is to add new entries to
> the PRINCIPAL_RULE_ASSOC and RULE_CRITERION tables.
> The first table's structure and purpose are quite
> clear. If I want to create a new 'dce_rule'(for both
> pages and docsets) for the 'dce_admin' user I think
> I
> should do the following:
> 
> insert into PRINCIPAL_RULE_ASSOC values
> ('dce_admin',
> page, 'dce_rule');
> insert into PRINCIPAL_RULE_ASSOC values
> ('dce_admin',
> docset, 'dce_rule');
> 
> Then, I need to add new rule criteria for the new
> rule
> into the RULE_CRITERION table. I looked at the
> current
> values there and I am not sure how they are used to
> define profiling rules. More specifically, I see,
> for
> example, the following entries for the 'role-group'
> rule:
> 
> 	<row>
> 		<CRITERION_ID>11</CRITERION_ID>
> 		<RULE_ID>role-group</RULE_ID>
> 		<FALLBACK_ORDER>0</FALLBACK_ORDER>
> 		<REQUEST_TYPE>role</REQUEST_TYPE>
> 		<NAME>role</NAME>
> 		<VALUE></VALUE>
> 		<FALLBACK_TYPE>2</FALLBACK_TYPE>
> 	</row>
> 	<row>
> 		<CRITERION_ID>12</CRITERION_ID>
> 		<RULE_ID>role-group</RULE_ID>
> 		<FALLBACK_ORDER>1</FALLBACK_ORDER>
> 		<REQUEST_TYPE>navigation</REQUEST_TYPE>
> 		<NAME>navigation</NAME>
> 		<VALUE>/</VALUE>
> 		<FALLBACK_TYPE>2</FALLBACK_TYPE>
> 	</row>
> 	<row>
> 		<CRITERION_ID>13</CRITERION_ID>
> 		<RULE_ID>role-group</RULE_ID>
> 		<FALLBACK_ORDER>2</FALLBACK_ORDER>
> 		<REQUEST_TYPE>group</REQUEST_TYPE>
> 		<NAME>group</NAME>
> 		<VALUE></VALUE>
> 		<FALLBACK_TYPE>2</FALLBACK_TYPE>
> 	</row>
> 
> I aslo know (thanks to Randy's explanation) that the
> search paths returned by this rule are:
> /_role/rolename
> /_group/groupname
> /
> 
> However, I am not sure how and what fields from the
> RULE_CRITERION table are used to construct these
> paths. Are 'Name' or 'Value' fields used ? They are
> null's for group and role  request_type , but '/'
> for
> the navigation one. What are the 'path.session',
> 'navigation', and other REQUEST_TYPEs? And where
> does
> FALLBACK_TYPE come into play?
>  
> Basically, my question is: what is the meaning of
> the
> fields of this table and how are they used?
> 
> Thanks!
> Marina
> 
> P.S. I think I sent this e-mail to the development
> list as well - sorry about that, it was done my
> mistake
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Send holiday email and support a worthy cause. Do
> good. 
> http://celebrity.mail.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jetspeed-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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