googleapis / googleapis/google-api-ruby-client
Permission details are not returned when requested via #get_permission
- Dominant language
- Ruby
- Stars
- 2.9k
- Forks
- 888
- Avg merge
- 6m
- Merged PRs (30d)
- 218
Description
Hello!
I'm trying to retrieve `permissionDetails` information from the get permission endpoint, but it seems they are not being returned.
If we specify other fields or `*` it works fine. I tried to send "permission details" in `fields` using different formats, including the one specified [here](https://developers.google.com/drive/api/reference/rest/v3/permissions#Permission) (permissionDetails[].permissionType), but this one raises an exception.
Is there another way to retrieve permission details? I'm interested in the `inherited` attribute.
Thanks!
#### Environment details
- OS: MacOS 14.6.1 (23G93)
- Ruby version: 3.3.4
- Gem name and version: google-apis-drive_v3 (0.55.0)
#### Steps to reproduce
1. Add a new file to your drive
2. Set some permissions
3. Try to retrieve info using the Ruby client
#### Code example
```ruby
drive_service.get_permission(file_id, permission_id, fields: "type")
# => #
drive_service.get_permission(file_id, permission_id, fields: "*")
# `deleted, display_name, email_address, id, kind, pending_owner, photo_link, role, type` set to the Permission object, but not permission_details
permission = drive_service.get_permission(file_id, permission_id, fields: "permission_details")
# => #
permission.permission_details # => nil
drive_service.get_permission(file_id, permission_id, fields: "permissionDetails[].permissionType")
# invalidParameter: Invalid field selection permissionDetails[].permissionType (Google::Apis::ClientError)
```
Contributor guide
Assessment
This issue has not been assessed yet.