mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
disable inviting new users to orgs if login form is disabled
This commit is contained in:
@@ -94,6 +94,10 @@ func LoginApiPing(c *middleware.Context) {
|
||||
}
|
||||
|
||||
func LoginPost(c *middleware.Context, cmd dtos.LoginCommand) Response {
|
||||
if setting.DisableLoginForm {
|
||||
return ApiError(401, "Login is disabled", nil)
|
||||
}
|
||||
|
||||
authQuery := login.LoginUserQuery{
|
||||
Username: cmd.User,
|
||||
Password: cmd.Password,
|
||||
|
||||
Reference in New Issue
Block a user