Problem accessing a role in a Form: Orbeon Form Builder

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem accessing a role in a Form: Orbeon Form Builder

Kamlesh
Hi,

I have enabled Tomcat authentication by uncommenting the security settings in
the web.xml file of orbeon war file (and adding the user name in
tomcat-users.xml file). I am trying to conditionaly hide a control based on any
role. But I am not getting any role in the $fr-roles variable. I am providing
following expression in the visibility property of an input control,
$fr-roles = 'orbeon-admin'
But it appears that the variable is not being set properly. Is there any other
setting/configuration required?

Regards,
Kamlesh


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem accessing a role in a Form: Orbeon Form Builder

Kamlesh
The role I have specified is displayed properly on the Java Authentication
example of Orbeon application
(http://localhost:8080/orbeon/java-authentication/) , but it is not being
displayed on the for being created by the form builder. Please let me know what
mistake I am doing?

-Regards
Kamlesh


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem accessing a role in a Form: Orbeon Form Builder

Kamlesh
Awaiting Reply....
-Kamlesh


--
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
Reply | Threaded
Open this post in threaded view
|

Problem accessing a role in a Form

Kamlesh
Hi,

I guess setting the roles in a request header and setting name of the header in
the oxf.fr.authentication.header.roles property may resolve the problem. The
property is in orbeon\WEB-INF\resources\config\property-form-runner.xml file.

Any thoughts on how this can be done?

- Kamlesh


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem accessing a role in a Form

Alessandro Vernet
Administrator
Kamlesh,

Kamlesh123 wrote
I guess setting the roles in a request header and setting name of the header in
the oxf.fr.authentication.header.roles property may resolve the problem. The
property is in orbeon\WEB-INF\resources\config\property-form-runner.xml file.
All those configuration properties are there so the username / roles can be passed down by Form Runner to the persistence layer in case the persistence layer needs it. At this point I think only the Oracle persistence layer uses the username, and the roles aren't used by persistence layers.

But if you just want to check if a user has a certain role in your XForms code, you can use xxforms:is-user-in-role(xs:string) in an XPath expression (e.g. relevant="..." if you want to hide a control for some users). You can use this as well from an XPath expression you enter in Form Builder. For more on this (and other extension functions), see:

http://www.orbeon.com/ops/doc/reference-xforms-functions

Alex