diff --git a/public/app/core/angular_wrappers.ts b/public/app/core/angular_wrappers.ts index da3c48a94dd..a51a9c8175e 100644 --- a/public/app/core/angular_wrappers.ts +++ b/public/app/core/angular_wrappers.ts @@ -20,5 +20,5 @@ export function registerAngularDirectives() { ['tagOptions', { watchDepth: 'reference' }], ]); react2AngularDirective('selectUserPicker', UserPicker, ['backendSrv', 'handlePicked']); - react2AngularDirective('dashboardPermissions', DashboardPermissions, ['backendSrv', 'dashboardId']); + react2AngularDirective('dashboardPermissions', DashboardPermissions, ['backendSrv', 'dashboardId', 'folderTitle']); } diff --git a/public/app/core/components/Permissions/DashboardPermissions.tsx b/public/app/core/components/Permissions/DashboardPermissions.tsx index c004507a2d1..eda3ac18df1 100644 --- a/public/app/core/components/Permissions/DashboardPermissions.tsx +++ b/public/app/core/components/Permissions/DashboardPermissions.tsx @@ -5,6 +5,7 @@ import Permissions from 'app/core/components/Permissions/Permissions'; export interface IProps { dashboardId: number; + folderTitle: string; backendSrv: any; } @@ -18,10 +19,16 @@ class DashboardPermissions extends Component { } render() { - const { dashboardId, backendSrv } = this.props; + const { dashboardId, folderTitle, backendSrv } = this.props; return ( - + ); } } diff --git a/public/app/core/components/Permissions/Permissions.tsx b/public/app/core/components/Permissions/Permissions.tsx index c5b8682f1ee..bd9e903b116 100644 --- a/public/app/core/components/Permissions/Permissions.tsx +++ b/public/app/core/components/Permissions/Permissions.tsx @@ -25,6 +25,7 @@ export interface DashboardAcl { export interface IProps { dashboardId: number; + folderTitle?: string; permissions?: any; isFolder: boolean; backendSrv: any; @@ -86,7 +87,7 @@ class Permissions extends Component { } render() { - const { permissions, backendSrv } = this.props; + const { permissions, folderTitle, backendSrv } = this.props; return (
@@ -95,6 +96,7 @@ class Permissions extends Component { removeItem={this.removeItem} permissionChanged={this.permissionChanged} fetching={permissions.fetching} + folderTitle={folderTitle} />
@@ -144,8 +146,8 @@ class Permissions extends Component {
What are Permissions?

- An Access Control List (ACL) model is used for to limit access to Dashboard Folders. A user or a Team can - be assigned permissions for a folder or for a single dashboard. + An Access Control List (ACL) model is used to limit access to Dashboard Folders. A user or a Team can be + assigned permissions for a folder or for a single dashboard.

The permissions that can be assigned for a folder/dashboard are:

View, Edit and Admin.

diff --git a/public/app/core/components/Permissions/PermissionsList.tsx b/public/app/core/components/Permissions/PermissionsList.tsx index dadb6dbb6d6..80e26b536a1 100644 --- a/public/app/core/components/Permissions/PermissionsList.tsx +++ b/public/app/core/components/Permissions/PermissionsList.tsx @@ -8,12 +8,13 @@ export interface IProps { removeItem: any; permissionChanged: any; fetching: boolean; + folderTitle: string; } @observer class PermissionsList extends Component { render() { - const { permissions, removeItem, permissionChanged, fetching } = this.props; + const { permissions, removeItem, permissionChanged, fetching, folderTitle } = this.props; return ( @@ -34,38 +35,10 @@ class PermissionsList extends Component { itemIndex={idx} removeItem={removeItem} permissionChanged={permissionChanged} + folderTitle={folderTitle} /> ); })} - {/* - - - - - - - - - */} {fetching === true && permissions.length < 1 ? ( - +
- - - - Inherited from folder - Can -
- -
-
- - - -
- No permissions are set. Will only be accessible by admins. -
diff --git a/public/app/core/components/Permissions/PermissionsListItem.tsx b/public/app/core/components/Permissions/PermissionsListItem.tsx index b29c9788ff0..d292b036b9e 100644 --- a/public/app/core/components/Permissions/PermissionsListItem.tsx +++ b/public/app/core/components/Permissions/PermissionsListItem.tsx @@ -6,7 +6,7 @@ const setClassNameHelper = inherited => { return inherited ? 'gf-form-disabled' : ''; }; -export default observer(({ item, removeItem, permissionChanged, itemIndex }) => { +export default observer(({ item, removeItem, permissionChanged, itemIndex, folderTitle }) => { const handleRemoveItem = evt => { evt.preventDefault(); removeItem(itemIndex); @@ -26,7 +26,7 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex }) => {item.inherited ? Inherited from folder : null}{item.inherited ? Inherited from folder {folderTitle} : null} Can
@@ -44,12 +44,6 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex }) => ); })} - - {/*
diff --git a/public/app/features/dashboard/settings/settings.html b/public/app/features/dashboard/settings/settings.html index d6dd1069c68..69da47c00ad 100644 --- a/public/app/features/dashboard/settings/settings.html +++ b/public/app/features/dashboard/settings/settings.html @@ -96,11 +96,19 @@
-

Permissions

+

Permissions + + What are Permissions? +

+ An Access Control List (ACL) model is used to limit access to Dashboard Folders. A user or a Team can be assigned permissions for a folder or for a single dashboard. +
+

+ - + backendSrv="ctrl.backendSrv" + folderTitle="ctrl.dashboard.meta.folderTitle" + />