File tree 3 files changed +4
-4
lines changed 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ func GetAllOrgs(ctx *context.APIContext) {
105
105
listOptions := utils .GetListOptions (ctx )
106
106
107
107
users , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
108
+ Actor : ctx .User ,
108
109
Type : models .UserTypeOrganization ,
109
110
OrderBy : models .SearchOrderByAlphabetically ,
110
111
ListOptions : listOptions ,
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ func GetAll(ctx *context.APIContext) {
128
128
listOptions := utils .GetListOptions (ctx )
129
129
130
130
publicOrgs , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
131
+ Actor : ctx .User ,
131
132
ListOptions : listOptions ,
132
133
Type : models .UserTypeOrganization ,
133
134
OrderBy : models .SearchOrderByAlphabetically ,
Original file line number Diff line number Diff line change @@ -54,15 +54,13 @@ func Search(ctx *context.APIContext) {
54
54
55
55
listOptions := utils .GetListOptions (ctx )
56
56
57
- opts := & models.SearchUserOptions {
57
+ users , maxResults , err := models . SearchUsers ( & models.SearchUserOptions {
58
58
Actor : ctx .User ,
59
59
Keyword : ctx .FormTrim ("q" ),
60
60
UID : ctx .FormInt64 ("uid" ),
61
61
Type : models .UserTypeIndividual ,
62
62
ListOptions : listOptions ,
63
- }
64
-
65
- users , maxResults , err := models .SearchUsers (opts )
63
+ })
66
64
if err != nil {
67
65
ctx .JSON (http .StatusInternalServerError , map [string ]interface {}{
68
66
"ok" : false ,
You can’t perform that action at this time.
0 commit comments