Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
07934691
Unverified
Commit
07934691
authored
Apr 23, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use inherited property from api when rendering permissions
parent
d86ed679
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
public/app/core/components/Permissions/PermissionsListItem.tsx
+1
-1
public/app/stores/PermissionsStore/PermissionsStore.jest.ts
+1
-0
public/app/stores/PermissionsStore/PermissionsStore.ts
+0
-2
No files found.
public/app/core/components/Permissions/PermissionsListItem.tsx
View file @
07934691
...
@@ -41,7 +41,7 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
...
@@ -41,7 +41,7 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
permissionChanged
(
itemIndex
,
permissionOption
.
value
,
permissionOption
.
label
);
permissionChanged
(
itemIndex
,
permissionOption
.
value
,
permissionOption
.
label
);
};
};
const
inheritedFromRoot
=
item
.
dashboardId
===
-
1
&&
folderInfo
&&
folderInfo
.
id
===
0
;
const
inheritedFromRoot
=
item
.
dashboardId
===
-
1
&&
!
item
.
inherited
;
return
(
return
(
<
tr
className=
{
setClassNameHelper
(
item
.
inherited
)
}
>
<
tr
className=
{
setClassNameHelper
(
item
.
inherited
)
}
>
...
...
public/app/stores/PermissionsStore/PermissionsStore.jest.ts
View file @
07934691
...
@@ -16,6 +16,7 @@ describe('PermissionsStore', () => {
...
@@ -16,6 +16,7 @@ describe('PermissionsStore', () => {
permissionName
:
'View'
,
permissionName
:
'View'
,
teamId
:
1
,
teamId
:
1
,
team
:
'MyTestTeam'
,
team
:
'MyTestTeam'
,
inherited
:
true
,
},
},
{
{
id
:
5
,
id
:
5
,
...
...
public/app/stores/PermissionsStore/PermissionsStore.ts
View file @
07934691
...
@@ -224,8 +224,6 @@ const prepareServerResponse = (response, dashboardId: number, isFolder: boolean,
...
@@ -224,8 +224,6 @@ const prepareServerResponse = (response, dashboardId: number, isFolder: boolean,
};
};
const
prepareItem
=
(
item
,
dashboardId
:
number
,
isFolder
:
boolean
,
isInRoot
:
boolean
)
=>
{
const
prepareItem
=
(
item
,
dashboardId
:
number
,
isFolder
:
boolean
,
isInRoot
:
boolean
)
=>
{
item
.
inherited
=
!
isFolder
&&
!
isInRoot
&&
dashboardId
!==
item
.
dashboardId
;
item
.
sortRank
=
0
;
item
.
sortRank
=
0
;
if
(
item
.
userId
>
0
)
{
if
(
item
.
userId
>
0
)
{
item
.
name
=
item
.
userLogin
;
item
.
name
=
item
.
userLogin
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment