-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add missing User Management API endpoints #169
Conversation
6b1d8c0
to
c5276bb
Compare
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.
Minor naming nitpicks in the source doc comments.
lib/auth0/api/v2/users.rb
Outdated
# @see https://auth0.com/docs/api/management/v2#!/Users/delete_permissions | ||
# | ||
# @param user_id [string] The user_id of the permissions to remove. | ||
# @param permissions [array] An array of Permissions to remove. |
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.
Random uppercase P on permissions.
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.
"Permissions" here refers to the struct I made for this PR.
|
||
# Check a permissions array | ||
def validate_permissions_array(permissions) | ||
raise Auth0::InvalidParameter, 'Must supply an array of Permissions' unless permissions.kind_of?(Array) |
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.
Capitalized Permissions here too should be permissions.
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.
👆
Changes
Adds all missing User endpoints:
Auth0::Api::V2::Users.get_roles
Auth0::Api::V2::Users.remove_roles
Auth0::Api::V2::Users.add_roles
Auth0::Api::V2::Users.get_enrollments
Auth0::Api::V2::Users.get_permissions
Auth0::Api::V2::Users.remove_permissions
Auth0::Api::V2::Users.add_permissions
Auth0::Api::V2::Users.generate_recovery_code
Auth0::Api::V2::Users.invalidate_browsers
Testing
Will add integration tests in another PR after Roles
Checklist