rework permission methods
lavigne958 opened this issue · comments
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
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.
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 !