dashfolders: link to folder for inherited permissions

In the permissions view in dashboard settings, this adds a
link to the parent folder for inherited permissions. Which
allows the user to easily navigate to the folder and change
inherited permissions.
This commit is contained in:
Daniel Lee
2018-01-29 16:08:48 +01:00
parent 7900fd4a79
commit d74a98feff
10 changed files with 45 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import { observer } from 'mobx-react';
import UserPicker, { User } from 'app/core/components/Picker/UserPicker';
import TeamPicker, { Team } from 'app/core/components/Picker/TeamPicker';
import { aclTypes } from 'app/stores/PermissionsStore/PermissionsStore';
import { FolderInfo } from './FolderInfo';
export interface DashboardAcl {
id?: number;
@@ -25,7 +26,7 @@ export interface DashboardAcl {
export interface IProps {
dashboardId: number;
folderTitle?: string;
folderInfo?: FolderInfo;
permissions?: any;
isFolder: boolean;
backendSrv: any;
@@ -87,7 +88,7 @@ class Permissions extends Component<IProps, any> {
}
render() {
const { permissions, folderTitle, backendSrv } = this.props;
const { permissions, folderInfo, backendSrv } = this.props;
return (
<div className="gf-form-group">
@@ -96,7 +97,7 @@ class Permissions extends Component<IProps, any> {
removeItem={this.removeItem}
permissionChanged={this.permissionChanged}
fetching={permissions.fetching}
folderTitle={folderTitle}
folderInfo={folderInfo}
/>
<div className="gf-form-inline">
<form name="addPermission" className="gf-form-group">