Thanks to visit codestin.com
Credit goes to github.com

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

add grant listing and granting admin #322

Closed
wants to merge 1 commit into from
Closed

Conversation

aisch
Copy link

@aisch aisch commented May 13, 2016

needed for an ansible influxdb_user (make admin) and influxdb_privs (check if priv granted) modules

@aviau
Copy link
Collaborator

aviau commented Jun 13, 2016

Can you please rebase your PR? (or just merge master in your branch)

(please GitHub, give me a rebase button like Gerrit)

@sebito91
Copy link
Contributor

@aisch is this still required? If so can you please rebase against master and remove the SHOW GRANTS component as that was merged in by #330

@sebito91
Copy link
Contributor

Stale, closing due to age.

def grant_admin_privileges(self, username):
"""Grant cluster administration privileges to a user.
:param username: the username to grant privileges to
:type username: str
.. note:: Only a cluster administrator can create/drop databases
and manage users.
"""
text = "GRANT ALL PRIVILEGES TO {0}".format(quote_ident(username))
self.query(text, method="POST")

@sebito91 sebito91 closed this Sep 10, 2019
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.

3 participants