|
| 1 | +``` |
| 2 | +# EasyCLA Sign Flow: Sequence Overview |
| 3 | +
|
| 4 | +## 1. User Creates a Pull Request (PR) |
| 5 | +- A contributor initiates a PR in the repository hosted on GitHub, Gerrit, or GitLab. |
| 6 | +
|
| 7 | +## 2. Repository Triggers Activity Endpoint |
| 8 | +- The repository platform sends a request to EasyCLA's Python endpoint: |
| 9 | + ``` |
| 10 | + v2/repository-provider/{provider}/activity |
| 11 | + ``` |
| 12 | +
|
| 13 | +## 3. EasyCLA Checks User Authorization |
| 14 | +- EasyCLA internally verifies if the users involved in the PR are authorized to contribute to the repository. |
| 15 | +
|
| 16 | +## 4. Update Repository with User Status |
| 17 | +- EasyCLA communicates back to the repository provider, updating the status of each user as either **signed** or **not signed**. |
| 18 | +
|
| 19 | +## 5. User Initiates Sign Process |
| 20 | +- If a user is marked as **not signed**, they are prompted to begin the signing process and are redirected to the **EasyCLA Contributor Console**. |
| 21 | +
|
| 22 | +## 6. Contributor Chooses Sign Type |
| 23 | +- Upon reaching the Contributor Console, the user selects one of two options: |
| 24 | + - **Individual Contributor** |
| 25 | + - **Corporate Contributor** |
| 26 | +
|
| 27 | +--- |
| 28 | +
|
| 29 | +## 7. Individual Contributor Flow |
| 30 | +
|
| 31 | +### a. Initiate Individual Signature Request |
| 32 | +- The system invokes the Go-based endpoint: |
| 33 | + ``` |
| 34 | + v4/request-individual-signature |
| 35 | + ``` |
| 36 | +- This action creates a new signature record with `signed = false` and initiates the signing process. |
| 37 | +
|
| 38 | +### a1. Redirect to DocuSign |
| 39 | +- The API handles the integration with DocuSign, preparing a callback and redirect URL, and redirects the user to DocuSign for signing. |
| 40 | +
|
| 41 | +### a2. Completion of Signing |
| 42 | +- Once the user completes the signing on DocuSign, a callback is triggered to: |
| 43 | + ``` |
| 44 | + v4/signed/individual/{installation_id}/{github_repository_id}/{change_request_id} |
| 45 | + ``` |
| 46 | +- This endpoint updates the signature record's `signed` flag to **true**, completing the process. |
| 47 | +
|
| 48 | +--- |
| 49 | +
|
| 50 | +## 8. Corporate Contributor Flow |
| 51 | +
|
| 52 | +### b. Initiate Corporate Signature Process |
| 53 | +
|
| 54 | +#### 1. Redirect to Company Search |
| 55 | +- The user is redirected to a company search interface within the Contributor Console. |
| 56 | +
|
| 57 | +#### 2. Search for Company |
| 58 | +- Upon selecting a company, the system calls the Go-based search endpoint: |
| 59 | + ``` |
| 60 | + v3/organization/search?companyName=<company_name>&include-signing-entity-name=false |
| 61 | + ``` |
| 62 | +- This retrieves the relevant company information. |
| 63 | +
|
| 64 | +#### 3. Check and Prepare Employee Signature |
| 65 | +- The system invokes the Python endpoint: |
| 66 | + ``` |
| 67 | + v2/check-prepare-employee-signature |
| 68 | + ``` |
| 69 | +- This checks whether the company follows a **Corporate CLA (CCLA)** or an **Entity CLA (ECLA)** flow. |
| 70 | +
|
| 71 | +--- |
| 72 | +
|
| 73 | +### i. If Company Has a CCLA: |
| 74 | +- The system verifies if the user is authorized: |
| 75 | + - **If not authorized:** |
| 76 | + - Prompts the user to contact the existing CLA manager for authorization. |
| 77 | + - Sends a notification to CLA managers via the Go-based endpoint: |
| 78 | + ``` |
| 79 | + v4/notify-cla-managers |
| 80 | + ``` |
| 81 | + - An email is sent to the CLA managers, and the process ends. |
| 82 | + - **If authorized:** |
| 83 | + - Calls: |
| 84 | + ``` |
| 85 | + v4/request-employee-signature |
| 86 | + ``` |
| 87 | +
|
| 88 | +--- |
| 89 | +
|
| 90 | +### ii. If Company Does Not Have a CCLA: |
| 91 | +- The system checks if the user is a CLA manager: |
| 92 | + - **A. User is a CLA Manager:** |
| 93 | + - Assigns CLA manager designee permissions via: |
| 94 | + ``` |
| 95 | + v4/company/{companySFID}/user/{userLFID}/claGroupID/{claGroupID}/cla-manager-designee |
| 96 | + ``` |
| 97 | + - Verifies the assigned role: |
| 98 | + ``` |
| 99 | + v4/company/{companySFID}/user/{userLFID}/claGroupID/{claGroupID}/is-cla-manager-designee |
| 100 | + ``` |
| 101 | + - Redirects to the corporate console where the user can see the **Sign** button. |
| 102 | + - Calls the endpoint to request a corporate signature: |
| 103 | + ``` |
| 104 | + v4/request-corporate-signature |
| 105 | + ``` |
| 106 | + - This creates the signature record, completing the process. |
| 107 | +
|
| 108 | + - **B. User is Not a CLA Manager:** |
| 109 | + - Fetches company administrators using: |
| 110 | + ``` |
| 111 | + v4/company/{companySFID}/admin |
| 112 | + ``` |
| 113 | + - Sends an invitation to become a company admin via: |
| 114 | + ``` |
| 115 | + /user/{userID}/invite-company-admin |
| 116 | + ``` |
| 117 | + - An email is sent to the user to invite them as a company admin, concluding the process. |
| 118 | +``` |
0 commit comments