mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Signed-off-by: Maksym Trofimenko <maksym@container-registry.com>
This commit is contained in:
parent
40ba15ca5a
commit
6b46b8bf26
@ -85,7 +85,11 @@ func (b *BaseAPI) HasProjectPermission(ctx context.Context, projectIDOrName inte
|
||||
p, err := baseProjectCtl.GetByName(ctx, projectName)
|
||||
if err != nil {
|
||||
log.Errorf("failed to get project %s: %v", projectName, err)
|
||||
return false
|
||||
if errors.IsNotFoundErr(err) {
|
||||
p = &project.Project{}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if p == nil {
|
||||
log.Warningf("project %s not found", projectName)
|
||||
|
Loading…
Reference in New Issue
Block a user