Login  Register

Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

Posted by fl.schmitt(ops-users) on Mar 07, 2011; 11:57am
URL: https://discuss.orbeon.com/p-param-type-input-name-instance-tp3338458p3338808.html

Smaran,

> So far all right, but although there is an authenticated user in the
>  context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no
>  reference to the user, or when you create or modify forms, data is not
>  saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains
>  empty although there is an authenticated user.

it seems that crud.xpl doesn't use the container authentication data;
this may be a bug.

If i understand crud.xpl correctly, the username value is set in line 82
of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64
of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In
both cases, the output of /request/headers/header[name =
'orbeon-username']/value is used, assuming that this header field
contains the user name.

But the name of the authenticated user isn't availbe
in /request/headers/header[name = 'orbeon-username']/value. The path
should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the
sources. The docs of the request generator don't mention a header field
named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37

You could try to change crud.xpl manually to use the name of the
authenticated user as username; i've attached a patch. Since i don't use
SQL persistence, i wasn't able to test i myselft, and i don't know which
other effects may be caused by this chance.

HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

patch.txt (1K) Download Attachment