fix: role and user command revamp for cloud - #113
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughRole handling now distinguishes dataset and tag fields, uses exact role membership checks, updates user role assignment requests, adds cloud-specific guidance, and simplifies the role-selection interface by removing stream and tag inputs. ChangesRole workflows
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant UserCommand
participant RoleAPI
participant UserAPI
User->>UserCommand: add or assign roles
UserCommand->>RoleAPI: fetch available roles
RoleAPI-->>UserCommand: role names
UserCommand->>UserAPI: PATCH user/{name}/role/add
UserAPI-->>UserCommand: role assignment response
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/user.go`:
- Around line 75-79: Update the CLI documentation for all affected commands: in
cmd/user.go lines 75-79, state that Cloud users must be invited through the
dashboard; in cmd/user.go lines 202-203, clarify that user set-role adds roles
without removing existing assignments; in cmd/role.go lines 108-114, explain
that role add requests only a privilege; and in cmd/role.go lines 162-170,
document role remove and its rm alias, including guidance for missing roles.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 57fcb3a2-2a8f-40ed-b498-2c71cf07dea2
📒 Files selected for processing (3)
cmd/role.gocmd/user.gopkg/model/role/role.go
Description
This PR improves user and role management:
Documentation updates needed
Please update the CLI docs for:
pb user add <user> --role <role>pb user set-role <user> <role>pb role add <role>pb role remove/rm <role>Mention that Cloud users must be invited through the dashboard.
Summary by CodeRabbit