File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ func GetAllOrgs(ctx *context.APIContext) {
106106 listOptions := utils .GetListOptions (ctx )
107107
108108 users , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
109+ Actor : ctx .User ,
109110 Type : models .UserTypeOrganization ,
110111 OrderBy : models .SearchOrderByAlphabetically ,
111112 ListOptions : listOptions ,
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ func GetAll(ctx *context.APIContext) {
130130 listOptions := utils .GetListOptions (ctx )
131131
132132 publicOrgs , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
133+ Actor : ctx .User ,
133134 ListOptions : listOptions ,
134135 Type : models .UserTypeOrganization ,
135136 OrderBy : models .SearchOrderByAlphabetically ,
Original file line number Diff line number Diff line change @@ -56,15 +56,13 @@ func Search(ctx *context.APIContext) {
5656
5757 listOptions := utils .GetListOptions (ctx )
5858
59- opts := & models.SearchUserOptions {
59+ users , maxResults , err := models . SearchUsers ( & models.SearchUserOptions {
6060 Actor : ctx .User ,
6161 Keyword : strings .Trim (ctx .Query ("q" ), " " ),
6262 UID : ctx .QueryInt64 ("uid" ),
6363 Type : models .UserTypeIndividual ,
6464 ListOptions : listOptions ,
65- }
66-
67- users , maxResults , err := models .SearchUsers (opts )
65+ })
6866 if err != nil {
6967 ctx .JSON (http .StatusInternalServerError , map [string ]interface {}{
7068 "ok" : false ,
You can’t perform that action at this time.
0 commit comments