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

rework permission methods #1399

Open
lavigne958 opened this issue Jan 31, 2024 · 2 comments
Open

rework permission methods #1399

lavigne958 opened this issue Jan 31, 2024 · 2 comments

Comments

@lavigne958
Copy link
Collaborator

Overview

permissions methods are located in the client and in a the spreadsheet, this is not right, only 1 object should provide a single way to add/list/delete permission.

Details

The gspread client and the spreadsheet object allow a user to insert permissions, but only the client allows a user to list/remove a permission.

The spreadsheet object does not take the same kind of arguments as the gspread client does, this is confusing.

We should have a unified way of inserting/listing/deleting permissions.

This Issue is here to:

  • discuss it
    • where should they be located
    • what kind of argument should they take each
  • plan it
    • do we add the new methods and keep the old one too (marked as deprecated)
    • do we find an internal hidden way to make both work
    • when do we release them, next major release or sooner
@alifeee
Copy link
Collaborator

alifeee commented Jan 31, 2024

This will be good to look at. I will look into it more later, but for now, I think...

where should they be located

I think definitely in the Spreadsheet object. The http_client should be as minimal as possible so that anyone can make their own custom client.

@lavigne958
Copy link
Collaborator Author

I agree with you.

In the object oriented model we have:

  • the gspread client should only contain: file related actions, like open, list, remove ? Etc.
  • the spreadsheet object should be responsible for managing the permissions it holds.

This will most likely result in API breaking change as we will remove the methods from the gspread client.

But the good point is: well keep the logic for permissions in a single location !

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