Skip to content
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

V1.3 #81

Merged
merged 70 commits into from
Oct 28, 2021
Merged

V1.3 #81

merged 70 commits into from
Oct 28, 2021

Conversation

edarchis
Copy link
Member

Release preparation

edarchis and others added 30 commits May 17, 2021 23:34
The users query is now querying over the ClaimAdmin and Officer types.

This is not really a clean solution but it is the best that we could make with the existing table structures without breaking everything else.
Be careful not to optimize the graphql query or it would prevent the User dynamic mapping to the actual objects because some of them would be marked as "deferred".
The Mutations are not yet part of this commit but will follow shortly.
This requires an update to the Location module.
The "user" in UserMutation was clashing with the operating user.
It is now possible to call the user creation/update method with just the username instead of the exact core_user ID
health_facility_id was of the wrong type and not rendered in the response for InteractiveUser because the field is not a foreign key. Also added roles with a direct rendering rather than through a userRoles intermediate object.
The mutation link to actual objects was performed on the actual object itself. In the case of User, it caused some conflicts with its `__call__` method because _u was not properly initialised from Django itself. So we are now adding _id to the object and passing its id. We still need the object itself to identify the foreign key.
UserMutation was also not exposed to GraphQL and the user was not properly linked for the mutation, it was linked to connected user.
This was preventing the delete of users created from the mutations.
OFS-290: fixed bug with performing uuids bulk actions
OTC-289: Added GQL Query for languages
OFS-292: fixing bulk actions with amount/date valid filters
OE0-4: fixed getModulePermissions in core module
dragos-dobre and others added 22 commits September 13, 2021 12:13
OE0-64: Fixed HistoryModel uuid property
Save more fields of User, Officer & IUser when using Django
OE0-29: added migration for put missing role for ClaimAdministrator
#68
health_facility_id was renamed in code but not tests
The districts were added but didn't account for users without district limits.
Details: GHSA-xpfp-f569-q3p2

The proper way to address this would be to upgrade Django to 3.1.13 but it requires to update all the JSONField (and convert the NullBooleanField to BooleanField). While the JSONField seems to work when we remove the JSONFallback component, the boolean field does not work anymore with `bit` data types. They are compared with the boolean instead of 0 or 1.
I tried to check for updates on the mssql driver but it seems not to have moved in a long while.

I have therefore implemented the same kind of fix as the 3.1.13 did, right into the OrderedDjangoConnectionField...
OPL-13: Added decorators and functions for service signals
OPL-6: Fixed Base Delete Mutation
Security fix for Django order_by flaw
Fix field used to get db User
@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2021

This pull request introduces 5 alerts and fixes 6 when merging d9f1d10 into d02ac16 - view on LGTM.com

new alerts:

  • 3 for Clear-text logging of sensitive information
  • 2 for Use of a broken or weak cryptographic hashing algorithm on sensitive data

fixed alerts:

  • 3 for Unused local variable
  • 3 for Unused import

Fix field used to get db User
@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2021

This pull request introduces 5 alerts and fixes 6 when merging 0c550b8 into d02ac16 - view on LGTM.com

new alerts:

  • 3 for Clear-text logging of sensitive information
  • 2 for Use of a broken or weak cryptographic hashing algorithm on sensitive data

fixed alerts:

  • 3 for Unused local variable
  • 3 for Unused import

Merge pull request #80 from openimis/user
@delcroip delcroip marked this pull request as ready for review October 28, 2021 14:21
@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2021

This pull request introduces 5 alerts and fixes 6 when merging 76271ab into d02ac16 - view on LGTM.com

new alerts:

  • 3 for Clear-text logging of sensitive information
  • 2 for Use of a broken or weak cryptographic hashing algorithm on sensitive data

fixed alerts:

  • 3 for Unused local variable
  • 3 for Unused import

@edarchis edarchis merged commit 08e26d9 into main Oct 28, 2021
@edarchis edarchis deleted the v1.3 branch October 28, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants