Skip to content

feat: add form locking mechanism and share edit permission #2737

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Chartman123
Copy link
Collaborator

@Chartman123 Chartman123 commented May 11, 2025

  • lock form in backend
  • add lockedBy and lockedUntil to getForm and getForms
  • adjust documentation to reflect changes in form data structure and API behavior.
  • allow adding edit permission to shares in frontend (backend already handles it correctly)
  • respect locked form state in frontend
  • allow form owner to lock form completely
  • allow form owner to remove a lock
  • add/adjust tests

What should someone with edit permissions be able to do?

  • only the form owner can transfer ownership
  • only the form owner can lock a form completely/remove an existing lock
  • edit form:
    • title
    • description
    • submissionMessage
    • expiration
    • show expiration
    • state closed
    • state archived
    • anonymous answers
    • submit once/multiple
    • allow edit submissions
    • edit access (permitAllUsers, showToAllUsers)
    • link/unlink files
  • delete form
  • add/edit/delete questions
  • add/edit/delete options
  • add/edit/delete shares

@Chartman123 Chartman123 added enhancement New feature or request 2. developing Work in progress labels May 11, 2025
@Chartman123 Chartman123 self-assigned this May 11, 2025
@Chartman123 Chartman123 added this to the 5.2 milestone May 11, 2025
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch from f9b7c67 to fc37acb Compare May 11, 2025 22:46
@Chartman123 Chartman123 changed the title feat: add form locking mechanism and update API documentation feat: add form locking mechanism May 11, 2025
@Chartman123 Chartman123 linked an issue May 11, 2025 that may be closed by this pull request
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch from fc37acb to a3198a4 Compare May 11, 2025 22:56
@hamza221
Copy link
Contributor

#936

@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch 11 times, most recently from 18c3220 to 5c16474 Compare May 13, 2025 23:41
@Chartman123 Chartman123 linked an issue May 14, 2025 that may be closed by this pull request
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch 3 times, most recently from 77df1d9 to 59282d7 Compare May 14, 2025 23:19
Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 31.16279% with 148 lines in your changes missing coverage. Please review.

Project coverage is 44.21%. Comparing base (c10f2a4) to head (0194dbf).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2737      +/-   ##
============================================
- Coverage     45.58%   44.21%   -1.38%     
- Complexity      984     1019      +35     
============================================
  Files            79       80       +1     
  Lines          3565     3662      +97     
============================================
- Hits           1625     1619       -6     
- Misses         1940     2043     +103     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch 3 times, most recently from 986e8f9 to a342623 Compare May 15, 2025 09:34
@Chartman123 Chartman123 changed the title feat: add form locking mechanism feat: add form locking mechanism and share edit permission May 15, 2025
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch 18 times, most recently from db61925 to 5b0d4a6 Compare May 16, 2025 23:10
@Chartman123
Copy link
Collaborator Author

@susnux @hamza221 should be ready for a first review :)

@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch 2 times, most recently from a00eca1 to aaff8fa Compare May 17, 2025 09:40
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch from aaff8fa to ff55376 Compare May 28, 2025 22:08
- Implemented form locking functionality to prevent concurrent edits.
- Updated API responses to include `lockedBy` and `lockedUntil` fields.
- Enhanced permission checks to ensure only the form owner can transfer ownership.
- Revised documentation to reflect changes in form data structure and API behavior.

Signed-off-by: Christian Hartmann <[email protected]>
Signed-off-by: Christian Hartmann <[email protected]>
Signed-off-by: Christian Hartmann <[email protected]>
…for archiving, locking, and ownership transfer

Signed-off-by: Christian Hartmann <[email protected]>
@Chartman123 Chartman123 force-pushed the feat/shareEditPermission branch from ff55376 to 0194dbf Compare June 1, 2025 14:20
@Chartman123 Chartman123 marked this pull request as ready for review June 1, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock form 🔒 Collaborative editing of Forms
2 participants