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

Fix the error upon importing a template in forms (#1261) #1316

Merged
merged 7 commits into from
Nov 15, 2023

Conversation

Chouhartem
Copy link
Contributor

Fix the bug where importing a template in form raised an error: #1261

While fixing it, set a behaviour upon importing template:

  • Now, the settings on allowing anonymous responses and enforcing anonymous responses are stored into the template and override the previous ones.
    • Usecases: creating a template for anonymous poll and a template for registered-only users.

Changes in the behaviour:
- Load the parameter from allowing anonymous answers from templates
- Load the parameter for enforcing anonymous answers from templates
Changes done to avoid the creation of an invalid form (no answer
channel upon importing a template).
Also avoid the double call to the sanity check as it's already called
upon first loading the page.
@Chouhartem Chouhartem added Bug There is a problem in our source code Form Related to the Form app labels Nov 10, 2023
@Chouhartem Chouhartem added this to the 5.6.0 milestone Nov 10, 2023
@Chouhartem Chouhartem linked an issue Nov 10, 2023 that may be closed by this pull request
@yflory yflory merged commit 6f3c824 into staging Nov 15, 2023
Chouhartem added a commit to Chouhartem/cryptpad that referenced this pull request Nov 28, 2023
- Bug introduced in cryptpad#1316 to fix cryptpad#1261
- Was an issue when creating a new form (impossible to answer), however
  importing a template fixed it.
- priv should stay in the scope of initializeAnswers() and not leak
@ghost ghost deleted the fix-template-import branch December 22, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug There is a problem in our source code Form Related to the Form app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form: error importing template
2 participants