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
efbd93f8
Commit
efbd93f8
authored
Mar 06, 2019
by
Hugo Häggmark
Committed by
Leonard Gram
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teams: show teams and plugins for editors that can own
parent
124fb743
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
+29
-1
pkg/api/folder_test.go
+1
-1
pkg/api/index.go
+28
-0
No files found.
pkg/api/folder_test.go
View file @
efbd93f8
...
...
@@ -143,7 +143,7 @@ func createFolderScenario(desc string, url string, routePattern string, mock *fa
defer
bus
.
ClearBusHandlers
()
cfg
:=
setting
.
NewCfg
()
cfg
.
EditorsCanOwn
=
fals
e
cfg
.
EditorsCanOwn
=
tru
e
hs
:=
HTTPServer
{
Bus
:
bus
.
GetBus
(),
...
...
pkg/api/index.go
View file @
efbd93f8
...
...
@@ -327,6 +327,34 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er
})
}
if
c
.
OrgRole
==
m
.
ROLE_EDITOR
&&
hs
.
Cfg
.
EditorsCanOwn
{
cfgNode
:=
&
dtos
.
NavLink
{
Id
:
"cfg"
,
Text
:
"Configuration"
,
SubTitle
:
"Organization: "
+
c
.
OrgName
,
Icon
:
"gicon gicon-cog"
,
Url
:
setting
.
AppSubUrl
+
"/org/teams"
,
Children
:
[]
*
dtos
.
NavLink
{
{
Text
:
"Teams"
,
Id
:
"teams"
,
Description
:
"Manage org groups"
,
Icon
:
"gicon gicon-team"
,
Url
:
setting
.
AppSubUrl
+
"/org/teams"
,
},
{
Text
:
"Plugins"
,
Id
:
"plugins"
,
Description
:
"View and configure plugins"
,
Icon
:
"gicon gicon-plugins"
,
Url
:
setting
.
AppSubUrl
+
"/plugins"
,
},
},
}
data
.
NavTree
=
append
(
data
.
NavTree
,
cfgNode
)
}
data
.
NavTree
=
append
(
data
.
NavTree
,
&
dtos
.
NavLink
{
Text
:
"Help"
,
SubTitle
:
fmt
.
Sprintf
(
`%s v%s (%s)`
,
setting
.
ApplicationName
,
setting
.
BuildVersion
,
setting
.
BuildCommit
),
...
...
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