Commit c764e3c3 by Will Browne Committed by GitHub

remove org deprecation logs (#27788)

parent d3224172
......@@ -104,11 +104,6 @@ func (ss *SqlStore) Init() error {
ss.addAlertNotificationUidByIdHandler()
ss.addPreferencesQueryAndCommandHandlers()
err = ss.logOrgsNotice()
if err != nil {
return err
}
if ss.skipEnsureDefaultOrgAndUser {
return nil
}
......@@ -116,30 +111,6 @@ func (ss *SqlStore) Init() error {
return ss.ensureMainOrgAndAdminUser()
}
func (ss *SqlStore) logOrgsNotice() error {
type targetCount struct {
Count int64
}
return ss.WithDbSession(context.Background(), func(session *DBSession) error {
resp := make([]*targetCount, 0)
if err := session.SQL("select count(id) as Count from org").Find(&resp); err != nil {
return err
}
if resp[0].Count > 1 {
ss.log.Warn(`[Deprecation notice]`)
ss.log.Warn(`Fewer than 1% of Grafana installations use organizations, and we feel that most of those`)
ss.log.Warn(`users would have a better experience using Teams instead. As such, we are considering de-emphasizing`)
ss.log.Warn(`and eventually deprecating Organizations in a future Grafana release. If you would like to provide`)
ss.log.Warn(`feedback or describe your need, please do so in the issue linked below`)
ss.log.Warn(`https://github.com/grafana/grafana/issues/24588`)
}
return nil
})
}
func (ss *SqlStore) ensureMainOrgAndAdminUser() error {
err := ss.InTransaction(context.Background(), func(ctx context.Context) error {
systemUserCountQuery := models.GetSystemUserCountStatsQuery{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment