Allow settting of default org id to auto-assign to (#12401)

Author:    Mark Meyer <mark@ofosos.org>
This commit is contained in:
Mark Meyer
2018-07-13 21:14:40 +02:00
committed by Torkel Ödegaard
parent 7ae844518c
commit 0f6e5e2953
5 changed files with 21 additions and 4 deletions

View File

@ -387,6 +387,7 @@ func insertTestDashboardForPlugin(title string, orgId int64, folderId int64, isF
func createUser(name string, role string, isAdmin bool) m.User {
setting.AutoAssignOrg = true
setting.AutoAssignOrgId = 1
setting.AutoAssignOrgRole = role
currentUserCmd := m.CreateUserCommand{Login: name, Email: name + "@test.com", Name: "a " + name, IsAdmin: isAdmin}