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

Authorization status endpoint #4357

Open
nickmango opened this issue Jun 12, 2024 · 2 comments
Open

Authorization status endpoint #4357

nickmango opened this issue Jun 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request ldap

Comments

@nickmango
Copy link
Collaborator

nickmango commented Jun 12, 2024

Summary

In moving away from LDAP , theres need to adjust the current Gerrit flow and fetch the CLA status of a given LFID user

User Story

  • As a project administrator, I want to verify if a user(LFID) is authorized to contribute against a given CLA group , so that I can manage access to a gerrit instance

Acceptance Criteria

  1. The endpoint should be available at GET v4/cla/authorization
  2. The endpoint should accept the following parameters lfId, claGroupID
  3. Given a valid lfid and claGroupId the endpoint should return a response of authorized,lfid,claGroupId,claType,companyId(optional)
@nickmango nickmango added the enhancement New feature or request label Jun 12, 2024
@nickmango nickmango self-assigned this Jun 12, 2024
nickmango added a commit to nickmango/easycla that referenced this issue Jun 13, 2024
- Added endpoint /cla/authorization that returns whether a given lfid user is authorized

Signed-off-by: Harold Wanyama <hwanyama@contractor.linuxfoundation.org>
nickmango added a commit that referenced this issue Jun 13, 2024
@nickmango
Copy link
Collaborator Author

@thakurveerendras you can test and verify the new endpoint https://api-gw.dev.platform.linuxfoundation.org/cla-service/v4/api-docs#tag/signatures/operation/isAuthorized which checks if a gerrit user(lfid) has been able to sign a given cla-group-id . Returning a boolean status update as detailed in the doc

nickmango added a commit to nickmango/easycla that referenced this issue Jun 18, 2024
- Handled exception case for users that dont exist
- Updated response with ccla,icla,ccla_requires_icla fields

Signed-off-by: Harold Wanyama <hwanyama@contractor.linuxfoundation.org>
nickmango added a commit that referenced this issue Jun 18, 2024
@thakurveerendras
Copy link
Contributor

Tested API endpoint on dev site & found that it is working fine as expected. So updating this issue status QA-Done

{
"CCLA": false,
"CCLARequiresICLA": true,
"ICLA": true,
"authorized": true,
"claGroupId": "01af041c-fa69-4052-a23c-fb8c1d3bef24",
"companyAffiliation": true,
"lfid": "vthakur"
}

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ldap
Projects
None yet
Development

No branches or pull requests

3 participants