mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 14:34:49 +09:00
Remove unneeded doctor sub-commands (#37156)
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -1462,16 +1462,6 @@ func IsUserVisibleToViewer(ctx context.Context, u, viewer *User) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// CountWrongUserType count OrgUser who have wrong type
|
||||
func CountWrongUserType(ctx context.Context) (int64, error) {
|
||||
return db.GetEngine(ctx).Where(builder.Eq{"type": 0}.And(builder.Neq{"num_teams": 0})).Count(new(User))
|
||||
}
|
||||
|
||||
// FixWrongUserType fix OrgUser who have wrong type
|
||||
func FixWrongUserType(ctx context.Context) (int64, error) {
|
||||
return db.GetEngine(ctx).Where(builder.Eq{"type": 0}.And(builder.Neq{"num_teams": 0})).Cols("type").NoAutoTime().Update(&User{Type: 1})
|
||||
}
|
||||
|
||||
func GetOrderByName() string {
|
||||
if setting.UI.DefaultShowFullName {
|
||||
return "full_name, name"
|
||||
|
||||
Reference in New Issue
Block a user