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

Implemented NDA #2160

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Implemented NDA #2160

wants to merge 5 commits into from

Conversation

eugenvoronov
Copy link
Contributor

Description

Implemented a feature requiring workers to sign a NDA to protect requesters' datasets. It ensures compliance with data privacy laws and safeguards sensitive data and intellectual property.

Summary of changes

  1. NDAVersion Entity
    Defined an entity for NDA versions, including the following fields:
id: Primary key
version: String representing the version of the NDA
documentText: Text of the NDA
createdAt: Timestamp of when the NDA version was created
updatedAt: Timestamp of when the NDA version was updated
  1. NDA Entity
    Defined an entity for the NDA that users will sign, referencing the NDAVersion entity:
id: Primary key
createdAt: Timestamp of when the NDA was signed
ipAddress: IP address of the user at the time of signing
userId: Relationship with the User entity
ndaVersionId: Relationship with the NDAVersion entity
  1. NDA Endpoints
    Implemented the following endpoints:

GET /nda: Retrieves the latest NDA version. If the user has already signed it, returns null. If not, returns the NDA version information. Uses JWT authentication.
POST /nda/sign: Allows the user to sign the NDA. Uses JWT authentication.

  1. Added NDA Information to JWT
    Added the NDA signing status to the JWT payload:
"NDA": "true" or "false"

If the latest NDA version is not signed by the user, set it to "false".

How test the changes

yarn test

Related issues

[Reputation Oracle] NDA
#2148

Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
escrow-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2024 1:56pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
faucet-server ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 1:56pm

@eugenvoronov eugenvoronov self-assigned this Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants