LimeSurvey: master 6b9f6179

Author Committer Branch Timestamp Parent
twilllig GitHub master 2024-05-23 15:34 master 727e3bea
Changeset

QE -859 ensure permissions are enforced in rest api (#3814)

  • QE-859 / QE-846 - survey ID in context now mandatory for all OpHandlers

  • QE-859 permission checks in every OpHandler

  • fix docblock

  • fixed return type for function getSurveyIdFromContext

  • SurveyDetail now checks for read permission

  • using DI for Permission check in SurveyAggregateService.php and SubQuestionsService.php

  • Fixed unittest

  • Fixed permission check in SurveyDetail.php + fixed validation of entityId


Co-authored-by: Kevin Foster kevin.foster.uk@gmail.com

mod - application/libraries/Api/Command/V1/SurveyDetail.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerAnswer.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerAnswerDelete.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerLanguageSettingsUpdate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionAttributeUpdate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionCreate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionDelete.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionGroup.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionGroupL10n.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionGroupReorder.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionL10nUpdate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerQuestionUpdate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerSubQuestion.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerSubquestionDelete.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/OpHandlerSurveyUpdate.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/Response/ValidationErrorItem.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/Traits/OpHandlerSurveyTrait.php Diff File
mod - application/libraries/Api/Command/V1/SurveyPatch/Traits/OpHandlerValidationTrait.php Diff File
mod - application/models/services/QuestionAggregateService.php Diff File
mod - application/models/services/QuestionAggregateService/SubQuestionsService.php Diff File
mod - application/models/services/QuestionGroupService.php Diff File
mod - application/models/services/SurveyAggregateService.php Diff File
mod - application/models/services/SurveyAggregateService/LanguageSettings.php Diff File
mod - tests/unit/api/opHandlers/OpHandlerAnswerTest.php Diff File
mod - tests/unit/api/opHandlers/OpHandlerQuestionL10nTest.php Diff File
mod - tests/unit/api/opHandlers/OpHandlerSurveyUpdateTest.php Diff File
mod - tests/unit/services/QuestionAggregateService/SubquestionsServiceTest.php Diff File