fix: Get label requests now use "get" permission instead of "create"

This commit is contained in:
Andrey Melnikov
2020-04-14 11:22:54 -07:00
parent fa7dd28a9a
commit a5060a71ae
3 changed files with 3 additions and 3 deletions

View File

@@ -149,7 +149,7 @@ func (c *CronWorkflowServer) GetCronWorkflow(ctx context.Context, req *api.GetCr
func (c *CronWorkflowServer) GetCronWorkflowLabels(ctx context.Context, req *api.GetLabelsRequest) (*api.GetLabelsResponse, error) {
client := ctx.Value("kubeClient").(*v1.Client)
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "argoproj.io", "cronworkflows", "")
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", "cronworkflows", "")
if err != nil || !allowed {
return nil, err
}