auth: fix required permissions for SHOW MEASUREMENTS

When using `SHOW MEASUREMENTS ON <db>`, the required permissions didn't
take into account `<db>` and would only use the `db` parameters from the
HTTP parameters.
pull/8828/head
Joe LeGasse 2017-09-14 14:22:37 -04:00
parent 6e60edc4bd
commit 14f3c1e3d1
1 changed files with 1 additions and 1 deletions

View File

@ -2394,7 +2394,7 @@ func (s *ShowMeasurementsStatement) String() string {
// RequiredPrivileges returns the privilege(s) required to execute a ShowMeasurementsStatement.
func (s *ShowMeasurementsStatement) RequiredPrivileges() (ExecutionPrivileges, error) {
return ExecutionPrivileges{{Admin: false, Name: "", Privilege: ReadPrivilege}}, nil
return ExecutionPrivileges{{Admin: false, Name: s.Database, Privilege: ReadPrivilege}}, nil
}
// DefaultDatabase returns the default database from the statement.