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

Endpoint to See if User is Member of a Group #64

Open
rootelement opened this issue Aug 13, 2020 · 4 comments
Open

Endpoint to See if User is Member of a Group #64

rootelement opened this issue Aug 13, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rootelement
Copy link

In challenge api, we need to see if a user has access to a challenge. We have a group UUID and a member ID, but because of the security / groups and subgroups layout, it's not easy to see if a user has access to a group.

I propose providing an endpoint with a HEAD where you can just see if a user has access to a group. I'm thinking something like this:

HEAD /v5/groups/:groupUUID?memberId=12345

The response for this call should include a header that says if the user has access to that group UUID. This will prevent the challenge api side having to traverse a whole group tree of data, string matching on UUIDs.

@bountyC0d3r
Copy link
Collaborator

this has been implemented and deployed on dev

@lakshmiathreya
Copy link

@SathyaJayabal Pls verify and update QA status.

@SathyaJayabal
Copy link
Collaborator

@dushyantb , the endpoint returns check = false for all cases.
Example: the below user is the member of the below group, but the api returns false
member: 40159097
group: 20000000
Screenshot 2022-03-09 at 9 27 09 AM
Screenshot 2022-03-09 at 9 27 22 AM

@SathyaJayabal SathyaJayabal reopened this Mar 9, 2022
@SathyaJayabal
Copy link
Collaborator

cc @lakshmiathreya

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

No branches or pull requests

4 participants