File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1661,7 +1661,7 @@ function initDashboardSearch() {
1661
1661
repos : [ ] ,
1662
1662
searchQuery : '' ,
1663
1663
suburl : document . querySelector ( 'meta[name=_suburl]' ) . content ,
1664
- uid : document . querySelector ( 'meta[name=_uid ]' ) . content
1664
+ uid : document . querySelector ( 'meta[name=_context_uid ]' ) . content
1665
1665
} ,
1666
1666
1667
1667
mounted : function ( ) {
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ func Search(ctx *context.APIContext) {
32
32
Keyword : strings .Trim (ctx .Query ("q" ), " " ),
33
33
OwnerID : ctx .QueryInt64 ("uid" ),
34
34
PageSize : convert .ToCorrectPageSize (ctx .QueryInt ("limit" )),
35
- Searcher : ctx .User ,
35
+ }
36
+ if ctx .User .ID == opts .OwnerID {
37
+ opts .Searcher = ctx .User
36
38
}
37
39
38
40
// Check visibility.
Original file line number Diff line number Diff line change 14
14
{{if .IsSigned}}
15
15
<meta name="_uid" content="{{.SignedUser.ID}}" />
16
16
{{end}}
17
+ {{if .ContextUser}}
18
+ <meta name="_context_uid" content="{{.ContextUser.ID}}" />
19
+ {{end}}
17
20
{{if .GoGetImport}}
18
21
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
19
22
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
You can’t perform that action at this time.
0 commit comments