mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 13:44:59 -05:00
API: Restrict anonymous user information access (#18422)
Existing /api/alert-notifications now requires at least editor access. Existing /api/alert-notifiers now requires at least editor access. New /api/alert-notifications/lookup returns less information than /api/alert-notifications and can be access by any authenticated user. Existing /api/org/users now requires org admin role. New /api/org/users/lookup returns less information than /api/org/users and can be access by users that are org admins, admin in any folder or admin of any team. UserPicker component now uses /api/org/users/lookup instead of /api/org/users. Fixes #17318
This commit is contained in:
@@ -98,3 +98,8 @@ type HasEditPermissionInFoldersQuery struct {
|
||||
SignedInUser *SignedInUser
|
||||
Result bool
|
||||
}
|
||||
|
||||
type HasAdminPermissionInFoldersQuery struct {
|
||||
SignedInUser *SignedInUser
|
||||
Result bool
|
||||
}
|
||||
|
||||
@@ -88,3 +88,8 @@ type SearchTeamQueryResult struct {
|
||||
Page int `json:"page"`
|
||||
PerPage int `json:"perPage"`
|
||||
}
|
||||
|
||||
type IsAdminOfTeamsQuery struct {
|
||||
SignedInUser *SignedInUser
|
||||
Result bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user