mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* remove old page component * add test to check initDashboard is only called once (prevent variables loading twice) * add help node * update unit tests * remove last mentions of topnav * fix unit tests * remove unused props from ButtonRow interface * remove prop from test
19 lines
685 B
TypeScript
19 lines
685 B
TypeScript
import React from 'react';
|
|
|
|
import { Permissions } from 'app/core/components/AccessControl';
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
import { contextSrv } from 'app/core/core';
|
|
import { AccessControlAction } from 'app/types';
|
|
|
|
import { SettingsPageProps } from '../DashboardSettings/types';
|
|
|
|
export const AccessControlDashboardPermissions = ({ dashboard, sectionNav }: SettingsPageProps) => {
|
|
const canSetPermissions = contextSrv.hasPermission(AccessControlAction.DashboardsPermissionsWrite);
|
|
|
|
return (
|
|
<Page navModel={sectionNav}>
|
|
<Permissions resource={'dashboards'} resourceId={dashboard.uid} canSetPermissions={canSetPermissions} />
|
|
</Page>
|
|
);
|
|
};
|