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

Accessing an end user organization requests #493

Open
ggarciak opened this issue May 10, 2022 · 1 comment
Open

Accessing an end user organization requests #493

ggarciak opened this issue May 10, 2022 · 1 comment

Comments

@ggarciak
Copy link

I'm trying to get current user organization requests, the api-documentation provides the following endpoint for this:

GET /api/v2/organizations/{organization_id}/requests.json

But I'm not able to get here using the gem collections.

My client instance has and end-user email, so it has end-user privileges. The above endpoint works fine with the credentials since the organization matches the current user one (tested with postman), but when trying to access to @client.current_user.organization or @client.current_user.organization.requests it throws an error since it first does a call to:

GET api/v2/organizations/{organization_id}

and that returns a 403 forbidden error.

Issue #269 suggest finding the single org if you already have the id, but that line does the same GET call as asking for @current_user.organization, which ends up in the same 403 error.

Any help on how to call GET /api/v2/organizations/{organization_id}/requests.json directly from the gem using enduser privileges?

@rsl
Copy link

rsl commented May 11, 2022

im getting 403 on the POST/create endpoint for organization as admin. not sure if something weird might be going on?

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

No branches or pull requests

2 participants