Fix influxql permission grants with no allowances

pull/101/head
Chris Goller 2017-02-19 12:16:22 -06:00
parent 17f6f55269
commit 19018c97ca
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ func ToRevoke(username string, perm chronograf.Permission) string {
// ToGrant converts the permission into InfluxQL grants
func ToGrant(username string, perm chronograf.Permission) string {
if len(perm.Allowed) == 0 {
return ""
}
return ToInfluxQL("GRANT", "TO", username, perm)
}