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
parent
6e60edc4bd
commit
14f3c1e3d1
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue