mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RBAC: Render team, service account and user list when a user can see entities but not roles attached to them (#79642)
* Render list even when user cannot list roles assigned for entities
This commit is contained in:
@@ -41,7 +41,10 @@ export function loadTeams(initial = false): ThunkResult<void> {
|
||||
noTeams = response.teams.length === 0;
|
||||
}
|
||||
|
||||
if (contextSrv.licensedAccessControlEnabled()) {
|
||||
if (
|
||||
contextSrv.licensedAccessControlEnabled() &&
|
||||
contextSrv.hasPermission(AccessControlAction.ActionTeamsRolesList)
|
||||
) {
|
||||
dispatch(rolesFetchBegin());
|
||||
const teamIds = response?.teams.map((t: Team) => t.id);
|
||||
const roles = await getBackendSrv().post(`/api/access-control/teams/roles/search`, { teamIds });
|
||||
|
||||
Reference in New Issue
Block a user