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
b71c9803
Commit
b71c9803
authored
Mar 18, 2019
by
Hugo Häggmark
Committed by
Leonard Gram
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: new team link goes nowhere for viewers
parent
53c74fa2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
public/app/features/teams/TeamList.tsx
+4
-2
No files found.
public/app/features/teams/TeamList.tsx
View file @
b71c9803
...
...
@@ -92,7 +92,9 @@ export class TeamList extends PureComponent<Props, any> {
renderTeamList
()
{
const
{
teams
,
searchQuery
,
editorsCanAdmin
,
signedInUser
}
=
this
.
props
;
const
disabledClass
=
editorsCanAdmin
&&
signedInUser
.
orgRole
===
OrgRole
.
Viewer
?
' disabled'
:
''
;
const
isCanAdminAndViewer
=
editorsCanAdmin
&&
signedInUser
.
orgRole
===
OrgRole
.
Viewer
;
const
disabledClass
=
isCanAdminAndViewer
?
' disabled'
:
''
;
const
newTeamHref
=
isCanAdminAndViewer
?
'#'
:
'org/teams/new'
;
return
(
<>
...
...
@@ -109,7 +111,7 @@ export class TeamList extends PureComponent<Props, any> {
<
div
className=
"page-action-bar__spacer"
/>
<
a
className=
{
`btn btn-primary${disabledClass}`
}
href=
"org/teams/new"
>
<
a
className=
{
`btn btn-primary${disabledClass}`
}
href=
{
newTeamHref
}
>
New team
</
a
>
</
div
>
...
...
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