File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
bcs-services/cluster-resources/pkg/resource/client Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,12 @@ func (c *NSClient) List(ctx context.Context, opts metav1.ListOptions) (map[strin
62
62
if err != nil {
63
63
return nil , err
64
64
}
65
- if clusterInfo .Type == cluster .ClusterTypeShared {
65
+ projInfo , err := project .FromContext (ctx )
66
+ if err != nil {
67
+ return nil , err
68
+ }
69
+
70
+ if clusterInfo .Type == cluster .ClusterTypeShared && clusterInfo .ProjID != projInfo .ID {
66
71
return filterProjNSList (ctx , manifest )
67
72
}
68
73
return manifest , nil
@@ -93,7 +98,11 @@ func (c *NSClient) ListByClusterViewPerm(
93
98
if err != nil {
94
99
return nil , err
95
100
}
96
- if clusterInfo .Type == cluster .ClusterTypeShared {
101
+ projInfo , err := project .FromContext (ctx )
102
+ if err != nil {
103
+ return nil , err
104
+ }
105
+ if clusterInfo .Type == cluster .ClusterTypeShared && clusterInfo .ProjID != projInfo .ID {
97
106
return filterProjNSList (ctx , manifest )
98
107
}
99
108
return manifest , nil
You can’t perform that action at this time.
0 commit comments