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
319b8d8f
Commit
319b8d8f
authored
Mar 29, 2017
by
Seuf
Committed by
Torkel Ödegaard
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configurable signout menu activation (#7968)
parent
ac39ed42
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
1 deletions
+14
-1
conf/defaults.ini
+3
-0
conf/sample.ini
+3
-0
docs/sources/installation/configuration.md
+4
-0
pkg/api/frontendsettings.go
+1
-0
pkg/setting/setting.go
+2
-0
public/app/core/components/sidemenu/sidemenu.ts
+1
-1
No files found.
conf/defaults.ini
View file @
319b8d8f
...
@@ -205,6 +205,9 @@ default_theme = dark
...
@@ -205,6 +205,9 @@ default_theme = dark
# Set to true to disable (hide) the login form, useful if you use OAuth
# Set to true to disable (hide) the login form, useful if you use OAuth
disable_login_form
=
false
disable_login_form
=
false
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy
disable_signout_menu
=
false
#################################### Anonymous Auth ######################
#################################### Anonymous Auth ######################
[auth.anonymous]
[auth.anonymous]
# enable anonymous access
# enable anonymous access
...
...
conf/sample.ini
View file @
319b8d8f
...
@@ -192,6 +192,9 @@
...
@@ -192,6 +192,9 @@
# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
;disable_login_form = false
;disable_login_form = false
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
;disable_signout_menu = false
#################################### Anonymous Auth ##########################
#################################### Anonymous Auth ##########################
[auth.anonymous]
[auth.anonymous]
# enable anonymous access
# enable anonymous access
...
...
docs/sources/installation/configuration.md
View file @
319b8d8f
...
@@ -267,6 +267,10 @@ options are `Admin` and `Editor` and `Read Only Editor`. e.g. :
...
@@ -267,6 +267,10 @@ options are `Admin` and `Editor` and `Read Only Editor`. e.g. :
Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false.
Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false.
### disable_signout_menu
Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false.
<hr>
<hr>
## [auth.anonymous]
## [auth.anonymous]
...
...
pkg/api/frontendsettings.go
View file @
319b8d8f
...
@@ -143,6 +143,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
...
@@ -143,6 +143,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"alertingEnabled"
:
setting
.
AlertingEnabled
,
"alertingEnabled"
:
setting
.
AlertingEnabled
,
"googleAnalyticsId"
:
setting
.
GoogleAnalyticsId
,
"googleAnalyticsId"
:
setting
.
GoogleAnalyticsId
,
"disableLoginForm"
:
setting
.
DisableLoginForm
,
"disableLoginForm"
:
setting
.
DisableLoginForm
,
"disableSignoutMenu"
:
setting
.
DisableSignoutMenu
,
"buildInfo"
:
map
[
string
]
interface
{}{
"buildInfo"
:
map
[
string
]
interface
{}{
"version"
:
setting
.
BuildVersion
,
"version"
:
setting
.
BuildVersion
,
"commit"
:
setting
.
BuildCommit
,
"commit"
:
setting
.
BuildCommit
,
...
...
pkg/setting/setting.go
View file @
319b8d8f
...
@@ -96,6 +96,7 @@ var (
...
@@ -96,6 +96,7 @@ var (
LoginHint
string
LoginHint
string
DefaultTheme
string
DefaultTheme
string
DisableLoginForm
bool
DisableLoginForm
bool
DisableSignoutMenu
bool
// Http auth
// Http auth
AdminUser
string
AdminUser
string
...
@@ -528,6 +529,7 @@ func NewConfigContext(args *CommandLineArgs) error {
...
@@ -528,6 +529,7 @@ func NewConfigContext(args *CommandLineArgs) error {
// auth
// auth
auth
:=
Cfg
.
Section
(
"auth"
)
auth
:=
Cfg
.
Section
(
"auth"
)
DisableLoginForm
=
auth
.
Key
(
"disable_login_form"
)
.
MustBool
(
false
)
DisableLoginForm
=
auth
.
Key
(
"disable_login_form"
)
.
MustBool
(
false
)
DisableSignoutMenu
=
auth
.
Key
(
"disable_signout_menu"
)
.
MustBool
(
false
)
// anonymous access
// anonymous access
AnonymousEnabled
=
Cfg
.
Section
(
"auth.anonymous"
)
.
Key
(
"enabled"
)
.
MustBool
(
false
)
AnonymousEnabled
=
Cfg
.
Section
(
"auth.anonymous"
)
.
Key
(
"enabled"
)
.
MustBool
(
false
)
...
...
public/app/core/components/sidemenu/sidemenu.ts
View file @
319b8d8f
...
@@ -23,7 +23,7 @@ export class SideMenuCtrl {
...
@@ -23,7 +23,7 @@ export class SideMenuCtrl {
this
.
isSignedIn
=
contextSrv
.
isSignedIn
;
this
.
isSignedIn
=
contextSrv
.
isSignedIn
;
this
.
user
=
contextSrv
.
user
;
this
.
user
=
contextSrv
.
user
;
this
.
appSubUrl
=
config
.
appSubUrl
;
this
.
appSubUrl
=
config
.
appSubUrl
;
this
.
showSignout
=
this
.
contextSrv
.
isSignedIn
&&
!
config
[
'
authProxyEnabled
'
];
this
.
showSignout
=
this
.
contextSrv
.
isSignedIn
&&
!
config
[
'
disableSignoutMenu
'
];
this
.
maxShownOrgs
=
10
;
this
.
maxShownOrgs
=
10
;
this
.
mainLinks
=
config
.
bootData
.
mainNavLinks
;
this
.
mainLinks
=
config
.
bootData
.
mainNavLinks
;
...
...
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