Adding guest accounts count telemetry (#14257)
* Adding guest accounts count telemetry * Adding missed methods to the opentracing an timer layer
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
819f57037b
Коммит
f6f025aeaa
@@ -1290,6 +1290,14 @@ func (us SqlUserStore) AnalyticsGetInactiveUsersCount() (int64, *model.AppError)
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (us SqlUserStore) AnalyticsGetGuestCount() (int64, *model.AppError) {
|
||||
count, err := us.GetReplica().SelectInt("SELECT count(*) FROM Users WHERE Roles LIKE :Roles and DeleteAt = 0", map[string]interface{}{"Roles": "%system_guest%"})
|
||||
if err != nil {
|
||||
return int64(0), model.NewAppError("SqlUserStore.AnalyticsGetSystemAdminCount", "store.sql_user.analytics_get_system_admin_count.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (us SqlUserStore) AnalyticsGetSystemAdminCount() (int64, *model.AppError) {
|
||||
count, err := us.GetReplica().SelectInt("SELECT count(*) FROM Users WHERE Roles LIKE :Roles and DeleteAt = 0", map[string]interface{}{"Roles": "%system_admin%"})
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user