Skip to content
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

DXCDT-313: Add ability to view a user's assigned roles #604

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Jan 12, 2023

🔧 Changes

Adding the ability to view a user's assigned roles.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

return fmt.Errorf("failed to find roles for user with ID %s: %w", inputs.ID, err)
}

cli.renderer.RoleList(userRoleList.Roles)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this none-found hint is displayed: "Use 'auth0 roles create' to add one"

Eventually this help text should display something regarding the assignment of a role. Ex: "Use auth0 users roles assign"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: "No roles available." should read something like "No roles assigned to user".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now displays in 3094faf (#604)

=== tenant.eu.auth0.com roles assigned to user (0)

No roles assigned to user available.

 ▸    Use 'auth0 users roles assign' to add one

@sergiught sergiught force-pushed the feature/DXCDT-313-view-assigned-roles branch from ac216d8 to 3094faf Compare January 12, 2023 19:11
@sergiught sergiught marked this pull request as ready for review January 12, 2023 19:12
@sergiught sergiught requested a review from a team as a code owner January 12, 2023 19:12
@sergiught sergiught requested a review from willvedd January 12, 2023 19:12
Copy link
Contributor

@willvedd willvedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is a new command, can we add some type of commander test?

docs/auth0_actions_update.md Outdated Show resolved Hide resolved
internal/display/roles.go Outdated Show resolved Hide resolved
internal/display/roles.go Outdated Show resolved Hide resolved
internal/cli/users_roles.go Outdated Show resolved Hide resolved
internal/display/roles.go Show resolved Hide resolved
@sergiught sergiught force-pushed the feature/DXCDT-313-view-assigned-roles branch 2 times, most recently from fb39943 to fdc6df7 Compare January 17, 2023 14:46
@sergiught sergiught requested a review from willvedd January 17, 2023 14:53
@sergiught sergiught force-pushed the feature/DXCDT-313-view-assigned-roles branch from 73a6451 to aaf0137 Compare January 17, 2023 15:14
@sergiught sergiught merged commit 240ab48 into v1 Jan 17, 2023
@sergiught sergiught deleted the feature/DXCDT-313-view-assigned-roles branch January 17, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants