-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Where should has-permission
be accounted for?
#157
Comments
Hmm, good question. At an initial glance, I'd say we should try to stick to what would semantically make sense to someone writing a request. With that in mind, I think we might want to have it related to the Account class as that's what we're checking the permissions of:
I think you raise a good point about there being two different endpoints though: application and team. Part of me says we should do We could of course get round that by allowing another parameter to Finally, with the response we get, again you're right that we can't use an Ultimately I could probably be convinced of a few different directions at this point because there doesn't seem to be a clear-cut answer, but my gut does say it should revolve around |
Following up from this, we do have a few other endpoints in the account namespace that could benefit from a true/false response e.g. |
One additional point to mention is that If you do not have the permission, you receive a 403 response with
http://cloudapi-docs.acquia.com/#/Account/getAccountApplicationHasPermission The 403 is not in reference to being able to ask the question… it's mean to be the response that you will not have that particular permission. |
There is an API endpoint for
/account/applications/{applicationUuid}/has-permission
which returns basically true or false if the account has access to a specific permission on a specific application.Should this be a method in Account? Or in Permissions? Or… It doesn't really return an operation result, but an access response… Do we need a new AccessResponse class? Might be useful as there are other
has-permission
endpoints as well/account/teams/{teamUuid}/has-permission
but those seem to be the only two.They're both on the Account stub but might be more appropriate under Applications and Teams Endpoints respectively.
So before working on a PR, I figured I'd set a direction first.
The text was updated successfully, but these errors were encountered: