Permission details are not returned when requested via #get_permission
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start with the get_permission calls and fields values shown in the issue, then inspect the generated Permission definition and compare its permission_details field with the Google Drive API field-selection syntax. No repository file or test is named, so trace the client model and request handling from that entry point. Done means permission details, including inherited, can be requested without an invalid-field error.
Written by the indexing model from the issue text.
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 (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
- Add a new file to your drive
- Set some permissions
- Try to retrieve info using the Ruby client
Code example
drive_service.get_permission(file_id, permission_id, fields: "type")
# => #<Google::Apis::DriveV3::Permission:0x0000000154e90340 @type="user">
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")
# => #<Google::Apis::DriveV3::Permission:0x0000000155b71690>
permission.permission_details # => nil
drive_service.get_permission(file_id, permission_id, fields: "permissionDetails[].permissionType")
# invalidParameter: Invalid field selection permissionDetails[].permissionType (Google::Apis::ClientError)
- Dominant language
- Ruby
- Stars
- 2.9k
- Forks
- 888
- Avg merge
- 8m
- Merged PRs (30d)
- 242
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-api-ruby-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
googleapis/google-api-ruby-client#28001 · 5 reactions ·
Maintainers usually reply within 1 day
-
googleapis/google-api-ruby-client#27757 · 1 assignee ·
Maintainers usually reply within 1 day
-
google-apis-core: CompositeIO does not maintain the IO read contractPossibly taken @torreypayne claimed this 3 days ago. Open
googleapis/google-api-ruby-client#27758 · 1 assignee ·
Maintainers usually reply within 1 day
-
google-apis-core: singular PagedResults ignores maxPossibly taken @torreypayne claimed this 3 days ago. Open
googleapis/google-api-ruby-client#27759 · 1 assignee ·
Maintainers usually reply within 1 day
-
api: storage type: feature request
Difficulty 3/5 1-2 days Newbie friendliness 55/100
googleapis/google-api-ruby-client#27339 ·
Maintainers usually reply within 1 day
All issues in googleapis/google-api-ruby-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
TheOdinProject/curriculum#31423 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oxidize-rb/rb-sys#807 ·