I'm using request headers to set the role of the person entering a form, so someone opening a request uses the URL 'xxxx/app/form/new?orbeon-role=Requestor.
That successfully sets $fr-roles so that I can access their role inside the form and show them the parts of the form I want them to see. There are some conditions under which I might want to allow someone to change their role - specifically, for someone with an 'Approver' role, most of a form will be read-only. In order to allow them to create a form, I want them to be able to become a requestor. I don't want them to have two roles at once, because then the 'read-only' and 'visibility' mechanism breaks down; if someone is both Approver and Requestor, I can't make a form read-only for them. I'm doing this by modifying the code for the 'new' button on the summary screen, so that when someone with the role of Approver wishes to create a request, they can click on the 'new' button. I added a '?orbeon-role=Requestor' to the URL that gets called when the new button is pressed. I can see that the URL is correct in the browser, but the role doesn't change, so I suspect that the request headers are read once in a session to provide a value for $fr-roles and not again until the user actually logs out and back in. Can I set the fr-roles variable manually to achieve what I want, and if so, where do I need to do it to make it work ? |
Administrator
|
Hi James, What version is this on? I can't remember of an orbeon-role request parameter that would be used to set that the user's current role is. I am searching through our latest code, and don't see any occurrence of orbeon-role (not to be confused with the Orbeon-Roles header). Alex On Wed, May 13, 2015 at 1:56 PM, James Newcombe <[hidden email]> wrote: I'm using request headers to set the role of the person entering a form, so You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex,
I found a different and more workable approach. This is no longer an issue. Thanks, James. |
Administrator
|
James, Got it; I'm glad you did, and thank you for the update. Alex On Mon, May 18, 2015 at 10:02 AM, James Newcombe <[hidden email]> wrote: Alex, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |