fix: [DHIS2-21392] Form elements visble when no access to form#4535
Merged
Conversation
…hv/fix/DHIS2-21392_form-elements-renders-when-no-access-to-form
…hv/fix/DHIS2-21392_form-elements-renders-when-no-access-to-form
|
🚀 Deployed on https://deploy-preview-4535.capture.netlify.dhis2.org |
…hv/fix/DHIS2-21392_form-elements-renders-when-no-access-to-form
…hv/fix/DHIS2-21392_form-elements-renders-when-no-access-to-form
…y when no write access
|
simonadomnisoru
approved these changes
May 6, 2026
geethaalwan
approved these changes
May 7, 2026
geethaalwan
left a comment
There was a problem hiding this comment.
Tested successfully on 2.44,2.43.1,2.42.5,2.41.9 versions
58663c8
into
hv/chore/DHIS2-21371_EnrollmentDashboardReadOnly
42 of 44 checks passed
Contributor
Author
|
This PR was merged into a PR in progress instead of master. Therefore, the changes were reverted and will be implemented in PR #4549 instead. Thanks! |
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.



DHIS2-21392
Stop rendering the form elements when the user lacks write access. Also, by showing
NoWriteAccessMessageat the page level instead, we can remove many files and clean up our codebase.Behavior
New TEI page, no write access: message now shows a "Back" button that returns to the main page.Single event registration, no write access: SelectionsNoAccess wrapper removed; renders NoWriteAccessMessage with a "Back" button.Add Event (Tracker), no write access:NewEventWorkspaceperforms the access check and shows NoWriteAccessMessage for both the Report and Schedule tabs. Replaces the old per-widget no-access screens (disabled Save + Cancel).Edit event (Tracker): Not reachable after implementing read-only behaviour for dashboard.Cleanup
WidgetEnrollmentEventNew/AccessVerification/: in-widget access check no longer reachable (WidgetEnrollmentEventNew is only used by NewEventWorkspace, which now gates upstream). The withBrowserBackWarning HOC the wrapper applied is preserved in a smallOrgUnitFetcher.container.tsx.WidgetEventSchedule/AccessVerification/: safe because the schedule view has no URL of its own: it's only reachable as a tab inside NewEventWorkspace (gated upstream) or via the "Edit event" button (gated by the parent branch's NoWriteAccessMessage).