Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Add get_list_privileges() to InfluxDBClient #330

Merged
merged 2 commits into from
Jun 13, 2016
Merged

Add get_list_privileges() to InfluxDBClient #330

merged 2 commits into from
Jun 13, 2016

Conversation

wwentland
Copy link
Contributor

This allows library users to get a list of all privileges an InfluxDB
user has been granted.

One problematic aspect of this method is that, due to influxdata/influxdb#4511 the interface of privilege related methods is inconsistent.

We could perform the normalisation (removal of elements withNO PRIVILEGES and ALL PRIVILEGESALL) in the Python library, but I would prefer to keep the library simple and to see this fixed this in InfluxDB itself.

On the other hand including it would probably lead to client code that performs the normalisation itself and that would have to be adapted once these inconsistencies have been resolved.

@wwentland
Copy link
Contributor Author

I just noticed that this PR is pretty similar to #322, but I prefer to use get_list_privileges over get_list_grants as this matches the existing interface and documentation more closely.

This allows library users to get a list of all privileges an InfluxDB
user has been granted.
These test check for correct return value and exception handling in case
of incorrect usage.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants