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

Show grants for user statement #2650

Merged
merged 2 commits into from
Jun 16, 2015
Merged

Conversation

dgolja
Copy link
Contributor

@dgolja dgolja commented May 24, 2015

As described #2212 we need to add show grants for user statement, so we are able to see user privileges.

@dgolja dgolja force-pushed the show_grants_user branch 2 times, most recently from 0ded24e to 9420847 Compare May 24, 2015 13:30
@dgolja dgolja changed the title [WIP] Show grants for user statement Show grants for user statement May 24, 2015
user := s.User("susy")

// Grant normal user write privileges on database "bar".
user.Privileges["bar"] = influxql.WritePrivilege
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you check later on that this privilege actually comes back?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha probably 👍 Will fix it now ...

@dgolja dgolja force-pushed the show_grants_user branch 3 times, most recently from a74dd7e to 95c0f09 Compare May 28, 2015 12:57
@corylanou
Copy link
Contributor

+1. Can you also update CHANGELOG.md, and if you haven't already, please sign the CLA

@@ -1068,6 +1070,26 @@ func (p *Parser) parseShowServersStatement() (*ShowServersStatement, error) {
}

// parseShowDatabasesStatement parses a string and returns a ShowDatabasesStatement.
// This function assumes the "SHOW GRANTS" tokens have already been consumed.
func (p *Parser) parseGrantsForUserStatement() (*ShowGrantsForUserStatement, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the comment for this method.

@dgnorton
Copy link
Contributor

@n1tr0g thanks! Looks good overall. Just a couple small changes that need to be made.

@dgolja
Copy link
Contributor Author

dgolja commented May 29, 2015

No worries. I will apply the suggested changes tonight.

@dgolja
Copy link
Contributor Author

dgolja commented May 30, 2015

Changed applied.

@toddboom
Copy link
Contributor

toddboom commented Jun 2, 2015

@n1tr0g we just merged some major changes for rc32 - could you rebase this? thanks!

@dgolja
Copy link
Contributor Author

dgolja commented Jun 3, 2015

hehe that's really a MAJOR change. I will have a look.

@dgolja
Copy link
Contributor Author

dgolja commented Jun 7, 2015

merged and code modified. Please review.

@dgolja
Copy link
Contributor Author

dgolja commented Jun 12, 2015

Good work with the release of 0.9.0, but I am surprised that this change didn't get merged before that.

Is there an alternative way to see users privileges on a database ?

@corylanou
Copy link
Contributor

@n1tr0g I take the blame for not merging this on time. Sorry about that, I know we created unnecessary work for you, and that's not cool. Looks like it might need a rebase one more time likely due to a changelog conflict if I had to guess, but I also know we've already asked you to do more work than you should of. If you want, I can rebase it for you and merge it in.

Thanks for all your work, and so sorry this didn't get merged.

@dgolja
Copy link
Contributor Author

dgolja commented Jun 16, 2015

HeHe yeah this PR is taking ages, but no problem. Rebase done.

@dgnorton
Copy link
Contributor

+1 LGTM
@n1tr0g, thanks for sticking with it!

@otoolep
Copy link
Contributor

otoolep commented Jun 16, 2015

+1 here too -- I'll merge now since @dgnorton also approved.

otoolep added a commit that referenced this pull request Jun 16, 2015
@otoolep otoolep merged commit 38b4f07 into influxdata:master Jun 16, 2015
@corylanou
Copy link
Contributor

Wohoo its merged! Thanks again @n1tr0g!!!

@dgolja
Copy link
Contributor Author

dgolja commented Jun 16, 2015

haha now I can have a drink to celebrate that :)

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

Successfully merging this pull request may close these issues.

5 participants