grafana/public/app/features/teams/state/selectors.ts
Ieva d3f69fd34a
Chore: legacy access control cleanup for frontend team pages (#75005)
* clean up legacy access control code for teams

* remove editorsCanAdmin config from the frontend

* add editorsCanAdmin config option back for the frontend
2023-10-09 10:32:44 +01:00

12 lines
293 B
TypeScript

import { Team, TeamState } from 'app/types';
export const getTeamGroups = (state: TeamState) => state.groups;
export const getTeam = (state: TeamState, currentTeamId: any): Team | null => {
if (state.team.id === parseInt(currentTeamId, 10)) {
return state.team;
}
return null;
};