mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Access control: Using RBAC to filter users in list view that you have read access to (#47963)
* Add SQL filter for global user search * Remove scope requirements from endpoints Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
@@ -146,7 +146,13 @@ func (s *Service) Get(ctx context.Context, orgID int64, signedInUser *models.Sig
|
||||
}
|
||||
|
||||
// NOTE: probably replace with comment and user table join.
|
||||
query := &models.SearchUsersQuery{Query: "", Filters: []models.Filter{NewIDFilter(userIds)}, Page: 0, Limit: len(userIds)}
|
||||
query := &models.SearchUsersQuery{
|
||||
Query: "",
|
||||
Page: 0,
|
||||
Limit: len(userIds),
|
||||
SignedInUser: signedInUser,
|
||||
Filters: []models.Filter{NewIDFilter(userIds)},
|
||||
}
|
||||
if err := s.sqlStore.SearchUsers(ctx, query); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user