mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* First stab at new page layouts behind feature toggle * Simplifying PageHeader * Progress on a new model that can more easily support new and old page layouts * Progress * rename folder * Progress * Minor change * fixes * Fixing tests * Make breadcrumbs work * Add tests for old Page component * Adding tests for new Page component and behavior * fixing page header test * Fixed test * AppChrome outside route * Renaming folder * Minor fix * Updated * Fixing StoragePage * Fix for banners Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
32 lines
820 B
TypeScript
32 lines
820 B
TypeScript
import React from 'react';
|
|
|
|
import { Permissions } from 'app/core/components/AccessControl';
|
|
import { contextSrv } from 'app/core/services/context_srv';
|
|
|
|
import { AccessControlAction, Team } from '../../types';
|
|
|
|
type TeamPermissionsProps = {
|
|
team: Team;
|
|
};
|
|
|
|
// TeamPermissions component replaces TeamMembers component when the accesscontrol feature flag is set
|
|
const TeamPermissions = (props: TeamPermissionsProps) => {
|
|
const canSetPermissions = contextSrv.hasPermissionInMetadata(
|
|
AccessControlAction.ActionTeamsPermissionsWrite,
|
|
props.team
|
|
);
|
|
|
|
return (
|
|
<Permissions
|
|
title=""
|
|
addPermissionTitle="Add member"
|
|
buttonLabel="Add member"
|
|
resource="teams"
|
|
resourceId={props.team.id}
|
|
canSetPermissions={canSetPermissions}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default TeamPermissions;
|