-
Notifications
You must be signed in to change notification settings - Fork 195
Comments
[core] Make DataInstance extend AccessibleResource#10365
Open
arnav-makkar wants to merge 4 commits intoaces:main from
Open
[core] Make DataInstance extend AccessibleResource #10365arnav-makkar wants to merge 4 commits intoaces:main from
arnav-makkar wants to merge 4 commits intoaces:main from
Conversation
@github-actions
github-actions
bot
added
Language: PHP
PR or issue that update PHP code
Module: issue_tracker
PR or issue related to issue tracker module
Module: acknowledgements
PR or issue related to acknowledgements module
Module: api
PR or issue related to api module
Module: battery_manager
PR or issue related to battery_manager module
Module: behavioural_qc
PR or issue related behavioural_qc module
Module: candidate_list
PR or issue related to candidate_list module
Module: conflict_resolver
PR or issue related to conflict_resolver module
Module: datadict
PR or issue related to (old) datadict module
Module: document_repository
PR or issue related to documen_repository module
Module: electrophysiology_browser
PR or issue related to electrophysiology_browser module
Module: electrophysiology_uploader
PR or issue related to electrophysiology_uploader
Module: examiner
PR or issue related to examiner module
Module: genomic_browser
PR or issue related to genomic_browser module
Module: help_editor
PR or issue related to help_editor module
Module: imaging_browser
PR or issue related to imaging_browser module
Module: instrument_manager
PR or issue related to instrument_manager module
Module: media
PR or issue related to media module
Module: module_manager
PR or issue related to module_manager module
Module: mri_violations
PR or issue related to mri_violations module
Module: schedule_module
PR or issue related to the schedule_manager module
Module: survey_accounts
PR or issue related to the survey_accounts module
Module: user_accounts
PR or issue related to the user_accounts module
Module: dicom_archive
PR or issue related to dicom_archive module
Module: data_release
PR or issue related to data_release module
labels
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
DataInstancecontract to extend both\JsonSerializableand\LORIS\StudyEntities\AccessibleResource, makingisAccessibleBy(\User): boolmandatory for all implementers.src/Data/Filters/AccessibleResourceFilter.phpby removing the runtimeinstanceof AccessibleResourceguard and callingisAccessibleBy()directly.src/StudyEntities/DataInstanceAccess.phpto centralize common center/project access checks (including getter variants and scalar ID normalization with fail-closed behavior).isAccessibleBy()implementations for all previously missingDataInstanceclasses, using shared helper logic for standard cases and explicit custom logic for exceptions (e.g., MRI violations, protocol-check violations, DICOM no-session rows, permission-gated DTOs).i. contract enforcement (
DataInstanceContractTest)ii. helper behavior (
DataInstanceAccessTest)iii. custom exception behavior (
DataInstanceBehaviorTest)Testing instructions (if applicable)
docker compose run -T --rm unit-tests vendor/bin/phpunit --configuration test/phpunit.xml test/unittests/DataInstanceContractTest.php test/unittests/DataInstanceAccessTest.php test/unittests/DataInstanceBehaviorTest.phpOK (16 tests, 139 assertions)Link(s) to related issue(s)