add isAdmin to user model (#6231)

update vendor and add tests

fix swagger
This commit is contained in:
Lanre Adelowo authored and techknowlogick committed 2019-03-03 17:57:24 -05:00
1 parent 8e202e28ad
commit 141c58f5a6
6 files changed
+28 -2

No files matched your search

+1
View File
@@ -75,6 +75,7 @@ func Search(ctx *context.APIContext) {
UserName: users[i].Name,
AvatarURL: users[i].AvatarLink(),
FullName: markup.Sanitize(users[i].FullName),
IsAdmin: users[i].IsAdmin,
}
if ctx.IsSigned && (!users[i].KeepEmailPrivate || ctx.User.IsAdmin) {
results[i].Email = users[i].Email