Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosave happening for user having failed to acquire a lease #4200

Closed
avernet opened this issue Oct 2, 2019 · 1 comment
Closed

Autosave happening for user having failed to acquire a lease #4200

avernet opened this issue Oct 2, 2019 · 1 comment

Comments

@avernet
Copy link
Collaborator

@avernet avernet commented Oct 2, 2019

Data should never be saved "in the background" if users failed to acquire a lease, but this can happen in situations where the form data changes after xforms-ready. We could prevent some of the actions causing the data to change from occurring (e.g. service calls), but should, "downstream", never save data if we don't have the lease.

+1 from customer

@avernet avernet self-assigned this Oct 2, 2019
@avernet avernet added this to To do in Orbeon Forms 2018.2.4 via automation Oct 2, 2019
@avernet avernet added this to To review in Orbeon Forms 2019.1 via automation Oct 2, 2019
avernet added a commit that referenced this issue Oct 2, 2019
@avernet avernet closed this in ef1f8d8 Oct 2, 2019
Orbeon Forms 2019.1 automation moved this from To review to Done Oct 2, 2019
Orbeon Forms 2018.2.4 automation moved this from To do to Done Oct 2, 2019
@avernet

This comment has been minimized.

Copy link
Collaborator Author

@avernet avernet commented Oct 3, 2019

Steps to reproduce:

  1. Use properties-local.xml below.
  2. In Form Builder, create a form with a field named c.
  3. Login as a, open /new, save, reload the page to have a lease.
  4. In Private mode (to have other cookies), login as b, open the URL of the form data, click the Validate button, wait for 10 seconds for the autosave to happen, got the "Summary" button, and notice how the draft has the value b.
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:oxf="http://www.orbeon.com/oxf/processors">

    <property as="xs:string"  name="oxf.fr.persistence.provider.*.*.*"          value="mysql"/>
    <property as="xs:boolean" name="oxf.fr.authentication.user-menu.enable"     value="true"/>
    <property as="xs:boolean" name="oxf.fr.detail.lease.enabled.*.*"            value="true"/>
    <property as="xs:string"  name="oxf.fr.detail.buttons.*.*">
        summary validate save-final
    </property>
    <property as="xs:string"  name="oxf.fr.detail.button.validate.visible.*.*"                   value="true()"/>
    <property as="xs:string"  name="oxf.fr.detail.process.validate.*.*">
        xf:setvalue(
            ref   = "//c",
            value = "fr:username()"
        )
    </property>

</properties>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.