- 
                Notifications
    You must be signed in to change notification settings 
- Fork 554
feat: validate kubeconfig and save clusters #3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
        
          
                api/cluster/ClusterRestHandler.go
              
                Outdated
          
        
      | //} | ||
|  | ||
| // RBAC enforcer applying | ||
| if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionCreate, "*"); !ok { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be superadmin check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok doing that
        
          
                api/cluster/ClusterRestHandler.go
              
                Outdated
          
        
      | } | ||
| result := []cluster.ClusterBean{} | ||
| for _, bean := range beans { | ||
| res, err := impl.clusterService.Save(ctx, &bean, userId) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not call our own service within orchestrator with token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sure
| SonarCloud Quality Gate failed.     
 
 | 








Description
Developed two nwe apis
Fixes #852
How Has This Been Tested?
Checklist: