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
cdfd3449
Commit
cdfd3449
authored
Dec 11, 2015
by
carl bergquist
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tmonk42-ldap_login_hints'
parents
8910351f
fab1062c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
1 deletions
+11
-1
conf/defaults.ini
+3
-0
conf/sample.ini
+3
-0
pkg/api/login.go
+1
-0
pkg/setting/setting.go
+2
-0
public/app/core/controllers/login_ctrl.js
+1
-0
public/app/partials/login.html
+1
-1
No files found.
conf/defaults.ini
View file @
cdfd3449
...
...
@@ -142,6 +142,9 @@ auto_assign_org_role = Viewer
# Require email validation before sign up completes
verify_email_enabled
=
false
# Background text for the user field on the login page
login_hint
=
email or username
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
...
...
conf/sample.ini
View file @
cdfd3449
...
...
@@ -134,6 +134,9 @@
# Default role new users will be automatically assigned (if disabled above is set to true)
;auto_assign_org_role = Viewer
# Background text for the user field on the login page
;login_hint = email or username
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
...
...
pkg/api/login.go
View file @
cdfd3449
...
...
@@ -28,6 +28,7 @@ func LoginView(c *middleware.Context) {
settings
[
"googleAuthEnabled"
]
=
setting
.
OAuthService
.
Google
settings
[
"githubAuthEnabled"
]
=
setting
.
OAuthService
.
GitHub
settings
[
"disableUserSignUp"
]
=
!
setting
.
AllowUserSignUp
settings
[
"loginHint"
]
=
setting
.
LoginHint
if
!
tryLoginUsingRememberCookie
(
c
)
{
c
.
HTML
(
200
,
VIEW_INDEX
)
...
...
pkg/setting/setting.go
View file @
cdfd3449
...
...
@@ -82,6 +82,7 @@ var (
AutoAssignOrg
bool
AutoAssignOrgRole
string
VerifyEmailEnabled
bool
LoginHint
string
// Http auth
AdminUser
string
...
...
@@ -436,6 +437,7 @@ func NewConfigContext(args *CommandLineArgs) error {
AutoAssignOrg
=
users
.
Key
(
"auto_assign_org"
)
.
MustBool
(
true
)
AutoAssignOrgRole
=
users
.
Key
(
"auto_assign_org_role"
)
.
In
(
"Editor"
,
[]
string
{
"Editor"
,
"Admin"
,
"Read Only Editor"
,
"Viewer"
})
VerifyEmailEnabled
=
users
.
Key
(
"verify_email_enabled"
)
.
MustBool
(
false
)
LoginHint
=
users
.
Key
(
"login_hint"
)
.
String
()
// anonymous access
AnonymousEnabled
=
Cfg
.
Section
(
"auth.anonymous"
)
.
Key
(
"enabled"
)
.
MustBool
(
false
)
...
...
public/app/core/controllers/login_ctrl.js
View file @
cdfd3449
...
...
@@ -18,6 +18,7 @@ function (angular, coreModule, config) {
$scope
.
googleAuthEnabled
=
config
.
googleAuthEnabled
;
$scope
.
githubAuthEnabled
=
config
.
githubAuthEnabled
;
$scope
.
disableUserSignUp
=
config
.
disableUserSignUp
;
$scope
.
loginHint
=
config
.
loginHint
;
$scope
.
loginMode
=
true
;
$scope
.
submitBtnText
=
'Log in'
;
...
...
public/app/partials/login.html
View file @
cdfd3449
...
...
@@ -24,7 +24,7 @@
<strong>
User
</strong>
</li>
<li>
<input
type=
"text"
name=
"username"
class=
"tight-form-input last"
required
ng-model=
'formModel.user'
placeholder=
"email or username"
style=
"width: 253px"
>
<input
type=
"text"
name=
"username"
class=
"tight-form-input last"
required
ng-model=
'formModel.user'
placeholder=
{{loginHint}}
style=
"width: 253px"
>
</li>
</ul>
<div
class=
"clearfix"
></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