Skip to content

Commit

Permalink
Merge branch 'main' into unify-migration-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Aug 25, 2021
2 parents b5441ac + b88dbe1 commit e3f79f9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -1619,14 +1619,7 @@ func (opts *SearchUserOptions) toConds() builder.Cond {
}

if opts.Actor != nil {
var exprCond builder.Cond
if setting.Database.UseMySQL {
exprCond = builder.Expr("org_user.org_id = user.id")
} else if setting.Database.UseMSSQL {
exprCond = builder.Expr("org_user.org_id = [user].id")
} else {
exprCond = builder.Expr("org_user.org_id = \"user\".id")
}
var exprCond builder.Cond = builder.Expr("org_user.org_id = `user`.id")

// If Admin - they see all users!
if !opts.Actor.IsAdmin {
Expand Down

0 comments on commit e3f79f9

Please sign in to comment.