-
Notifications
You must be signed in to change notification settings - Fork 17
feat: restrictions for users without IsViewerAllowed role #2675
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
|
/claude_review |
|
Claude finished @Raubzeug's task —— View job Code Review: feat: restrictions for users without IsViewerAllowed role📋 Review SummaryI've completed my review of this PR that implements role-based access restrictions for users without the ✅ What Works Well
🚨 Critical Issues1. Hardcoded Strings - i18n Violationsrc/components/VDiskPopup/VDiskPopup.tsx:36-92 contains multiple hardcoded strings that violate the i18n requirement: const vdiskData: InfoViewerItem[] = [{label: 'State', value: 'not available'}];
// Multiple instances of hardcoded labels like 'StoragePool', 'NodeId', 'PDiskId', etc.According to CLAUDE.md:299: "NEVER hardcode user-facing strings - use i18n". All these labels should use the i18n system. 2. Performance Concernssrc/store/reducers/cluster/cluster.ts:145-147: const {currentData} = clusterApi.useGetClusterBaseInfoQuery(clusterNameFromQuery ?? skipToken, {
skip: !isViewerUser,
});This completely skips the cluster base info query for non-viewer users, which could cause:
|
| const {currentData} = clusterApi.useGetClusterBaseInfoQuery(clusterNameFromQuery ?? skipToken, { | ||
| skip: !isViewerUser, |
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.
I'd better turn off specific functions (tracing, monitoring links) in place, not here. From this query we receive balancer data, that can be used to properly generate links, cluster title, control plane for backups, etc.
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.
Currently we don't want to get access to cluster info from database. So, I think we should use something else for backups. I'll fix it!
closes #2674
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 85.36 MB | Main: 85.35 MB
Diff: +6.44 KB (0.01%)
ℹ️ CI Information