-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: [DHIS2-17084] Filter Relationship Types for write access #3580
fix: [DHIS2-17084] Filter Relationship Types for write access #3580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this affect both viewing and adding? If I'm not mistaken, we will have to keep the readonly ones for viewing (so part 1 is to do what you basically did in this PR, but check for read access instead). When using the relationship types in the add part, we will have to filter for write access only.
select: ({ relationshipTypes }: any) => relationshipTypes | ||
.filter(({ access }) => access.data.write), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See general comment first.
A better way to do this is to add filter to the api request, like so: http://localhost:9090/api/relationshipTypes?filter=access.data.read:eq:true
Good catch, Joakim! Updated 😊 |
🚀 Deployed on https://deploy-preview-3580--dhis2-capture.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully on 2.41,2.40.4,2.39.6,2.38.7 versions
## [100.67.8](v100.67.7...v100.67.8) (2024-03-21) ### Bug Fixes * [DHIS2-17084] Filter Relationship Types for write access ([#3580](#3580)) ([439c7eb](439c7eb))
🎉 This PR is included in version 100.67.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Tech-summary: