Skip to content

Commit

Permalink
修复获取catalog时的权限问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
kychen committed May 27, 2020
1 parent e68ab6e commit d7fd694
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions registry/tokentransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,7 @@ func (authService *authService) Request(username, password string) (*http.Reques
q := url.Query()
q.Set("service", authService.Service)
if authService.Scope != "" {
sl := strings.Split(authService.Scope, ":")
if len(sl) >= 3 {
q.Set("scope", fmt.Sprintf("%s:%s:pull,push", sl[1], sl[2]))
} else {
q.Set("scope", authService.Scope)
}
q.Set("scope", authService.Scope)
}
url.RawQuery = q.Encode()

Expand Down

0 comments on commit d7fd694

Please sign in to comment.