Skip to content

Commit

Permalink
resolve the review comments
Browse files Browse the repository at this point in the history
Signed-off-by: wang yan <wangyan@vmware.com>
  • Loading branch information
wy65701436 committed May 13, 2024
1 parent 8e4386d commit a5f0835
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/v2.0/handler/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package handler

import (
"context"

"github.com/go-openapi/runtime/middleware"

"github.com/goharbor/harbor/src/common/rbac"
Expand Down Expand Up @@ -60,11 +60,11 @@ func (p *permissionsAPI) GetPermissions(ctx context.Context, _ permissions.GetPe
} else {
if sc, ok := secCtx.(*local.SecurityContext); ok {
user := sc.User()
is, err := p.mc.IsProjectAdmin(ctx, *user)
var err error
isProjectAdmin, err = p.mc.IsProjectAdmin(ctx, *user)
if err != nil {
return p.SendError(ctx, err)
}
isProjectAdmin = is
}
}
if !isSystemAdmin && !isProjectAdmin {
Expand Down

0 comments on commit a5f0835

Please sign in to comment.