From 92577e8d24a8d52c9d5eff3d5e330de92abdb2c6 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Sun, 25 Apr 2021 15:45:33 +0800 Subject: [PATCH] fix registry token issue Append pull permission to push when issue a registry token Signed-off-by: Wang Yan --- src/core/service/token/creator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/service/token/creator.go b/src/core/service/token/creator.go index fbd00482d..c44786631 100644 --- a/src/core/service/token/creator.go +++ b/src/core/service/token/creator.go @@ -204,6 +204,9 @@ func resourceScopes(sCtx security.Context, rc rbac.Resource) map[string]struct{} if ok1 && ok2 && ok3 { res["*"] = struct{}{} } + if ok1 && !ok2 { + res["pull"] = struct{}{} + } return res }