Граф коммитов

113 Коммитов

Автор SHA1 Сообщение Дата
Ferdinand Thiessen 6b8fdadc45
fix: Add brute force protection to form endpoints
* fix: Add brute force protection to form endpoints

Endpoints that query for forms are now protected against brute force
attacks to find valid forms, invalid hashes or IDs.

---------

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
2025-01-23 08:24:55 +01:00
Christian Hartmann 6ee4774389
fix php cs issues
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2025-01-17 09:56:24 +01:00
Christian Hartmann de004c2cb2
refactor: Add OpenAPI support
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-01-13 13:57:17 +01:00
Ferdinand Thiessen a467120404
test: Add test cases for admin settings possibly influencing the API
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-10 17:47:08 +01:00
Hamza Mahjoubi e5940640f1 chore : Add reuse compliance
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-12-17 18:12:39 +07:00
Hamza Mahjoubi afacbc422c fix: failing tests
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-12-17 18:04:59 +07:00
Christian Hartmann 70a3a3cf5d
Fix translation problem in notifications
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-12-06 11:54:36 +01:00
Andrii 7f7b470712
feat: Refactor form sync to run as a background job with retry (#2408)
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
2024-11-20 18:14:14 +01:00
Kostiantyn Miakshyn fa0067f833 fix: simplify mime-type checks to support jpg and other image formats #2399
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
2024-11-06 23:49:51 +01:00
Andrii Ilkiv cb611e8274 fix: default timezone for export
Signed-off-by: Andrii Ilkiv <a.ilkiv.ye@gmail.com>
2024-11-05 20:17:44 +02:00
Christian Hartmann 80fa593094
chore: remove API v2
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-10-12 23:46:36 +02:00
Thomas Citharel 7443df3b85
fix(export): remove new lines from form title in the exported filename
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-10-04 13:52:48 +02:00
Ferdinand Thiessen 7aba08d095
feat: Allow to reorder options for "multiple" question type
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-10-04 13:18:25 +02:00
Christian Hartmann 9ad8d3da4c
Refactor form creation and update logic
This commit refactors the form creation and update logic in the `ApiController` class. It removes the unnecessary setting of the `created` and `lastUpdated` timestamps in the `Form` entity, as these values are now automatically set in the `FormMapper` class. This improves code readability and reduces redundancy.

The changes also include updates to the `FormMapper` class, where the `insert` and `update` methods now automatically set the `created` and `lastUpdated` timestamps respectively.

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-09-26 23:18:27 +02:00
Christian Hartmann f756024b2a
Adjust php files to new CS
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-09-21 11:28:20 +02:00
Christian Hartmann 83a14ff136
remove unused LoggerInterface dependencies
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-09-11 22:27:41 +02:00
Christian Hartmann 6959b79f8e
chore(deps): update composer & npm
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-09-09 21:10:20 +02:00
Marcel Klehr 0005db604e feat: Allow listening to form submissions via events and webhooks
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2024-09-03 12:56:30 +02:00
Chartman123 ee697ff50f
enh: make show to all users an admin setting
Signed-off-by: GitHub <noreply@github.com>
2024-08-31 18:34:42 +00:00
Christian Hartmann 5eb799f19e
feat: add API v3
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-08-31 00:01:30 +02:00
Christian Hartmann 176fc244f7
run cs:fix
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-08-24 10:52:10 +02:00
Ferdinand Thiessen 0f40230ca7
fix: DI `userId` instead of `userSession`
The `ActivityManager` only needs the user ID so we just can inject the `userId`.
Also make sure that it can be null, because the `ActivityManager` is DI in the `FormsService`
and the `FormsService` is used also for public forms where no user is logged in.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-21 00:22:03 +02:00
Christian Hartmann c22c515dbb
chore: unify __construct functions
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-08-14 14:47:53 +02:00
Rello 71b3185556
feat: Data source for the Analytics App
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: F. E Noel Nfebe <fenn25.fn@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-07-29 08:57:09 +02:00
ailkiv e98906d054 fix file types for question files
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
2024-07-10 13:39:38 +03:00
ailkiv a0b26dfdc5 Optimization method FormsService::canSubmit
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
2024-07-10 09:52:28 +03:00
Konstantin Myakshin 6720298f0d Add support for file question
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
2024-06-03 17:10:56 +03:00
Ferdinand Thiessen b7404cc443 feat: Allow to limit number of selected options for "multiple" question type
This allows setting a minimum and maximum of options.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-24 18:09:22 +02:00
Ferdinand Thiessen ad711a9102
fix(refactor): Remove duplicated code from ApiController
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-23 22:28:04 +02:00
Ferdinand Thiessen 4346e514d9
fix(tests): Add database test for shared forms and reuse integration test class
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-15 23:21:46 +02:00
Hamza Mahjoubi 02530b0d01
Add transfer ownership unit tests
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-04-14 15:32:09 +02:00
Christian Hartmann b155fc0aeb
Get only forms shared with user from database
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-04-13 09:40:50 +02:00
Ferdinand Thiessen b21dfab13d feat: Add new permission `embedd` to limit public shares which can be embedded
Co-authored-by: Chartman123 <chris-hartmann@gmx.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-22 17:37:47 +01:00
Ferdinand Thiessen 1533d5253c feat: Allow embedding forms within other websites
* Add embedded endpoint for page controller and allow
inserting submissions without CSFR as anonymous submissions
for public shares.
* Added submenu entry for copying the embedding code to the clipboard
and added documentation on how to use the embedded view.
* Switched to `vue-clipboard2` to allow copying to clipboard
from submenu entry (allows setting a container for the copy action).

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2024-03-22 17:37:47 +01:00
Ferdinand Thiessen afbea98fd1
feat: Add `state` to forms to allow manually close or archive forms
Archived forms can not be changed (except from being un-archived).
Closed forms behave like expired forms and just do not allow new submissions.
By default forms are in state `active`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-22 13:32:47 +01:00
Chartman123 ae07f89af9
Rename Circles to Teams in UI/logging
Signed-off-by: GitHub <noreply@github.com>
2024-03-13 08:52:50 +00:00
Chartman123 ca582ac14b
Merge pull request #1932 from nextcloud/chore/api2.4
Update API version to v2.4
2024-02-02 10:54:48 +01:00
Christian Hartmann 508a939a5a
Update API version to v2.4
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2024-02-01 18:49:49 +01:00
Konstantin Myakshin 4396fc36af Hide linked file actions from users who have access to results view
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
2024-02-01 15:04:19 +02:00
Konstantin Myakshin 8d2b52b4d6
enh: Added possibility to link spreadsheet for automatic submission export in multiple formats
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
2024-01-23 23:45:23 +01:00
Ferdinand Thiessen 655762a17b
fix: Prevent race condition on unique-submission forms
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-08 21:29:06 +01:00
Ferdinand Thiessen c026583a25 fix: Adjust API version, fix API test and make code naming consistent
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-21 14:48:42 +01:00
Mitchel bd8c324fb6 feat: Allow for duplicating questions
* ApiController can now receive a duplication request, copies the question and options to new ones and then returns that new question object.
* All questions can now handle duplication.
* Create can now handle the duplication of questions.
* Added the new api route.
* Some styling and variables renamed to fit nextcloud guidelines
* Written an integration test.
* Added some comments to new methods added.
* Added start for translation
* Refactored variable names and some cleanup.
* Create is now more concise.
* Updated routes

Signed-off-by: Mitchel van Hamburg <mitchelvanhamburg@posteo.net>
2023-12-21 14:48:42 +01:00
Ferdinand Thiessen d23e0d7436 enh: Allow to set results delete permission on the frontend
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-10 16:41:33 +01:00
Christian Hartmann c84e09da27 enh: use PUT for updating and move to API v2.2
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2023-11-29 20:35:38 +01:00
Ferdinand Thiessen 8f7f5411b4
fix(tests): Adjust users for test
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-11-28 13:48:37 +01:00
Ferdinand Thiessen 22bf12b721
feat: Validate custom input traits for short answers of new submissions
* Also validate `extraSettings` especially the regex for custom short input

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-11-27 14:48:22 +01:00
Christian Hartmann 0ed05d580d
Move parameter typing
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
2023-10-30 21:43:24 +01:00
Ferdinand Thiessen 8303476b48
fix: Make sure "other" answers are correctly handled
In the backend it handling the "other" answer setting was not changed
after switching from object to array for extra settings.

In the frontend the value handling of the checkboxes or radio switches
was not correct as the initial values is always an empty array.
This lead to issues with radio switch answers.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-10-26 22:37:08 +02:00
Chartman123 ef0bdcd9f6
Merge pull request #1659 from nextcloud/feat/custom-submission-message-385
feat: Implement custom submission message
2023-10-16 22:21:58 +02:00